Subject Re: [IBO] Re: support for 2 transactions in ib_query
Author Daniel Rail
Hi,

At July 2, 2004, 19:20, gsmcq wrote:

>> One thing that seems to pop out at me, how is the ordering of the
> rows
>> managed with FIBPlus, if the original Select has been executed and
>> thereafter you insert and update rows, that would affect the sort
>> order of the result set. The only answer that I can think of is that
>> there's some sorting performed in the buffer on the client, and that
>> any additional rows fetched from the server will have to be sorted
> by
>> the client.
> And how is this taken care in IBO?

It hasn't been implemented in IBO, and I don't know if Jason will
implement it.

>> My preferred way is to have one read-only TIB_Query(or TIBOQuery)
>> attached to a read-only transaction for viewing data in a grid and
>> searching. And, then use a read/write TIB_Query(or TIBOQuery)
> attached
>> to a read-write transaction for editing the selected row in a popup
>> form.
> And how do you see the result in the read-only TIB_Query? Do you call
> TIB_Query.Refresh after you make changes to the read-write query?

Yes, I do a refresh. If I would have the TIB_Query.FetchWholeRows
property set to False, I use the method TIB_Query.RefreshKeys(it will
only refetch the row keys and not the whole row), otherwise I use
TIB_Query.Refresh.

> If
> you could avoid somehow to refetch all the rows and only fetch the
> rows added to the read-write query, that would be great.

In a multi-user environment, it's almost a requirement to refetch the
rows(although IBO does have methods already implemented to fetch the
added/deleted/modified rows as needed, by invalidating the buffer).
Otherwise, how would you know if someone else has inserted, modified
or deleted a row, if your result set buffer is only synchronized with
your changes. Do keep in mind that changes to a table is not
automatically pushed onto the client, you have to go fetch them. And,
when opening/refreshing a query, IBO only fetches the rows that you
currently need and not all the rows, unless you specifically request
them. Read IBO's help for TIB_Query, you'll find some information on
the different methods that exists on how to refresh the rows/buffer of
a query, you'll see that some of the methods are there just to refresh
the buffered rows.


--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)