Subject Re: [IBO] Two datasets, One inserted, Other updated fetching
Author Geraldo Lopes de souza
"Geoff Worboys" <geoff@...> escreveu na mensagem
> > I want to use two datasets for performance reasons. In order to
> > choose which record to edit, the user doesn't need to see all
> > information (blobs, lookups, details datasets) .
> > I forgot to say that I'm using TIB_Query.
> Set FetchWholeRows = false and IBO will manage this automatically.
> When FetchWholeRows is false IBO sets up an special statement that
> only returns key values, and a separate statement that returns the
> entire row for specific (key located) records. The full rows are only
> retrieved for rows that are specifically referenced.


Piece of FetchWholeRows help

" The down-side to this setting is that, with three cursors instead of one,
the rows are not able to be batched up into a single network packet.
Instead, they come one at a time which could possibly end up being less
efficient if, eventually, the whole dataset has to be fetched.

Normally, it is better to leave FetchWholeRows set to True so that IB can
batch rows together in a packet for more efficient transmission across the
wire. Arrange for the user to make use of the search mode, rather than
scroll around. Entering search criteria is more accurate for locating target
rows and offloads work to the server more efficiently ."

Since I use the search mode and don't use locate, IncSearchs I think that
having three cursors is worse than just having one.

The necessity of using two datasets have an interface motivations too.
Take a patient record for example. I can have one PatientsList form that
implement search, and I one PatientForm that show and edit all information
regarding one patient. This form can be reused over the application. This
form don't have any navigators, and can be designed using OK Cancel Apply
buttons, in my opinion a much more intuitive interface.

Let's look at what happens when you insert one record in a dataset. The
record is inserted in an arbitrary position without respecting the current
dataset's order. This is done to eliminate a hit the server. This is all I
need to achieve my objective. Create the ilusion to the user that he has
inserted the record in the PatientsLists without going unnecessarily (in my
opinion) to the server and position the record in the dataset according the
current order.

Thanks for answering,

Geraldo Lopes de Souza