Subject Re: [IBO] tib_query...Using it...Help.
Author Geoff Worboys
> For example I have a collection of TAddress objects
> some of which are Tnewaddress objects and some are
> ToldAddress objects.

It sounds like you have built yourself some sort of cached update
arrangement. That you are not using data-aware controls, but rather
you are feeding thise Tnew* and Told* objects from "standard"
controls. Given this I imagine that you have a form of controls which
feed these objects and then when the user hits the "Save" button you
process the objects to the server.

Am I close to correct?


If I am correct then I think you have two options...

1. Discard all your previous work and rewrite using IBO-aware controls
and TIB_Query components. You can still "batch" your work either
using cached updates (built into IBO) or using transactions - which
are designed for specifically this purpose.

OR

2. Ignore most of IBO and simply use the TIB_Cursor and/or TIB_DSQL
components with parameters (to provide the key information for
locating the records to be updated, deleted). If using TIB_Cursor you
simply call Insert or Edit and then update the fields
(IB_Cursor1.FieldByName(...)) as required and then call Post.


There is probably little point in going into more detail until we know
whether my above assumptions are correct, and which path you wish to
follow.

I will say that option 2 will leave you with much more code to write,
and will not take advantage of many of IBOs built-in capabilities.
However it would allow you to keep much more of your current
application. Note that TIB_Query is really setup for user
interaction using IBO-aware controls, more often than not it is
inappropriate in other circumstances.


Geoff Worboys
Telesis Computing