Subject TIBOQuery Posts Automatically
Author paultugwell
I have 2 TIBOQueries as follows

QueryA : SELECT TRANS, NUMB, SX,.. FROM MOVEMENT WHERE TRANS = 'X'
AND NUMB = :N AND SX = :S

QueryB : SELECT TRANS, NUMB, SX,.. FROM MOVEMENT WHERE TRANS = 'Y'
AND NUMB = :NUMB AND SX = :SX

QueryA is in a Master-Detail Relationship with QueryB via the
datasource to which QueryA is connected. Both Queries only ever
contain 1 record when opened.

When creating a new record, QueryA's N parameter is set to 0 then
QueryA is opened and placed into insert mode followed by QueryB.

After entry of the other data into the queries from a form a sequence
number is allocated which replaces the 0 in the NUMB fields. As soon
as the value of NUMB is set in QueryA, QueryB posts automatically
irrespective of whether its NUMB field had already been set or not.
Why is this? TQuery components do not behave in this manner. The
problem is easily fixed by a few changes in the order of coding in
the appropriate programs, but I am curious as to why this behaviour
occurs.

I also noticed that with TQuery components, opening and inseerting a
TQuery of this type dos not cause the parameter related fields to be
set to the values of the paramters passed whereas with TIBOQuery the
opposite is true (e.g. if I open and insert QueryA with a value of
parameter N set to 1, the Field NUMB will be null for a TQuery but 1
for a TIBOQuery).