Subject | Re: [IBO] tib_cursor error - attempt to fetch past the last record |
---|---|
Author | TeamIBO |
Post date | 2002-01-10T00:52:46Z |
> with MyCursor do beginYou must prepare before attempting to use parameters. Something along
> if Active then Close;
> ParamByName('P_ITEMID').AsInteger := CurrentId;
> Prepare;
> Open;
> end;
the lines of...
with MyCursor do begin
if not Prepared then
Prepare;
// close should not be necessary
ParamByName('P_ITEMID').AsInteger := CurrentId;
First;
end;
If you are setting multiple columns you should use...
with MyCursor do begin
if not Prepared then
Prepare;
Params.BeginUpdate;
try
ParamByName('P_ITEMID').AsInteger := CurrentId;
... other parameters ...
finally
Params.EndUpdate(true);
end;
First;
end;
> Also, does a tib_cursor need keylinks?I am not sure if there are any exceptions to the rule, but generally
keylinks are not required with ib_cursor.
--
Geoff Worboys - TeamIBO
Telesis Computing