Subject Re: [IBO] IB_Cursor closes on post
Author Alfred Seetoh
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 03:02 AM 9/12/2003 +0000, you wrote:
> >I did a simple experiment to use IB_Cursor to insert a record. I
> >realise IB_Cursor closes (Active = false) automatically after
> >posting. Just wondering if there's any way I can prevent it from
> >closing at all?
>
> It doesn't really "close" because there is nothing to close.
You "close" a
> buffered dataset. IB_Cursor is not buffered. It fetches one row
at a time
> into the a single-row buffer until it has fetched all of them. A
row
> exists in the row buffer until the next row arrives, then poof!! it
is
> gone. Once an ib_cursor has finished fetching rows, only the last
row is
> in the buffer. If it fetches past the last row, then the row
buffer is empty.
>
> Could you describe what your application needs to do, then someone
can
> recommend the best component to use for it.

Actually I'm still in the stage of trying out the things I can do
with different components. I believe using IB_Cursor to insert a
record will be faster than using IB_Query, thus I decided to try it
out. Then I realise the inserted record is gone once posted.

So now I know, if I simply want to insert records, I can use
IB_Cursor. But if I want the inserted record to remain there after
posting, I'll have to use IB_Query (I have data-aware controls on my
form). Thanks Helen.

> Helen