Subject tib_query...Using it...Help.
Author comesailing@btinternet.com
I know I am slow, but I just can't get to the bottom of this.
I have been right through the GSG and read all about it but not how
to 'drive'it from within a program.

The examples tend to use Jasons nice little 'Bars', but my program
has perhaps 50 records to fire off to the server with one button
labelled 'Send to Server'.
Some of these records are for update and some are new. The program
knows which are which.
For example I have a collection of TAddress objects some of which are
Tnewaddress objects and some are ToldAddress objects. The new ones
are obviously for insert and the old ones are for update. Each object
holds all the data required.
In my software which has been working for a couple of years I wrote a
stored progam call AddAddress which inserts a new one and
UpdateAddress which updates an old one.

But a tib_Query seems to be able to do all this with minimal effort.
Suppose I have a TOldAddress object to-hand and I want to send it to
the server using a tib_query what are the steps involved? (It has
an 'addressnum' which is the primary key already.
How would a TnewAddress be handled ? ...generator-links I think I
understand (and I need the value to put into other records wher this
is a 'foreign key')

I like to 'create' my tib_ objects program as required, so I do
myQuery := tib_Query.create(self) , then connect it write its sql etc.
try...connect it ..set it up...use it...finally mysql.free end;

But since I discovered the sql Wizard on the visual tib_query I stick
one of these on the form (which helps to bring in all the
necessary 'includes'). I use the visual tib_query wizard but use
windows 'cut and paste' to get the sql etc from the visual query into
my program because it is more accurate than my typing.
Then I delete the visual query. (I dont really know why I do this !)

Why all this? Well I am cleaning up my software which is a mess ! I
have 35 A4 pages of stored prorams half of which are redundant. and
In this re-write I thought it would be cleaner to use tib_queries.
How do you drive them ??? Please !!!.