Subject | Re: [IBO] IB_cursor and Append |
---|---|
Author | Helen Borrie |
Post date | 2003-01-31T13:40:39Z |
At 01:14 PM 31/01/2003 +0000, you wrote:
in the client, in the ib_cursor's Row buffer.
call) then the cursor will be at EOF only if the set is empty. Therefore,
Append is the wrong method to call - it appends a new row following the
current row...but an empty set has no current row... call Insert.
not buffered, i.e. it will not scroll. It presents each row directly into
the row buffer, and when your application asks for another row, e.g. Next,
Last or First, it clears the row buffer, fetches the requested row and
refills the row buffer.
row. If you reach the end of a scrollable dataset and move to the "next"
row, IBO will automatically append a new row to the buffer.
regards,
Helen
>Only a doubt about IB_Cursor and IB_Query.An IB_Cursor is not a buffered dataset - only the current row is contained
>
>Why IB_Cursor closes dataset when the Append method is called?
in the client, in the ib_cursor's Row buffer.
>with IB_Cursor doWhen you call First to open the ib_cursor (which is the correct method to
>begin
> if not Prepared then
> Prepare;
> if not IB_Transaction.InTransaction then <--- THIS MUST BE DONE BEFORE
> THE PREPARE.
> IB_Transaction.StartTransaction;
>
> First;
> if Eof then
> //*** here Active = True
> Append;
> //*** here Active = False
> ...
call) then the cursor will be at EOF only if the set is empty. Therefore,
Append is the wrong method to call - it appends a new row following the
current row...but an empty set has no current row... call Insert.
>Meaning that the detail tables doesn't work on inserts.ib_cursor is usually not a good one to use for detail sets because it is
not buffered, i.e. it will not scroll. It presents each row directly into
the row buffer, and when your application asks for another row, e.g. Next,
Last or First, it clears the row buffer, fetches the requested row and
refills the row buffer.
>Why it doesn't work like IB_Query that let dataset opened on insertBecause ib-query IS buffered and so you can scroll up and down from row to
>state?
row. If you reach the end of a scrollable dataset and move to the "next"
row, IBO will automatically append a new row to the buffer.
regards,
Helen