Subject Re: [IBO] Using TIB_QUERY
Author Geoff Worboys
> You both put the input data into 'Fields' where I tried
> to use 'Params'. I did this because I am anxious to avoid
> stuff I dont need being sent down the network, and I
> thought it would be better to 'tell the qry' by setting
> it up as an 'Insert' at the beginning that I wasn't
> interested in getting stuff sent down.

If you want to simply post the information to the database (and are
not interested in reading the information from the database) then use
the TIB_DSQL examples posted in the previous emails. Thats how you do
it if you dont want to read the information from the database first.

Note: The advantage of using (for example TIB_Cursor) and reading the
record from the database prior to performing; Edit, field update,
Post. Is that you have access to the other fields (in case some
information is dependant on existing data) and so you can optionally
choose to override or not override the various fields. (Am I making
sense here?)

Also: Be aware that sometimes triggers change field values. So in
certain instances you may need to refresh the information in your
objects from the database to make sure they reflect what is actually
stored.


> The Tib_query has a built-in Insert query so why not just
> transfer that as the main one.
> Was I right up a gum-tree here?

Not sure what you mean here. The built in insert/edit/delete stuff
all part of an integrated mechanism. The automation is designed to
build appropriate statements from the given select statement (OR you
can override with explicit SQL in the InsertSQL, EditSQL and DeleteSQL
properties). If you dont want to use that integrated mechanism then
you dont want TIB_Cursor or TIB_Query.

I suspect the difficulty is that you have been doing things "your way"
and that does not necessarily fit with the way IBO was setup. Thats
not to say that your way was wrong, only that it does not take
advantage of the code that IBO provides. It is because of that
mismatch that you are likely to need much more of your own code to
synchronise your objects with the IBO components.


Not sure if this is helping much. It gets hard to cover this sort of
thing in generalities.


Geoff Worboys
Telesis Computing