Subject PK field that auto filled with wrong generator value
Author Cipto
Hi all,

I use IBO 4.9.14 46 with Firebird 2.1.4

I have TIBOQuery which property IB_Connection set to TIBO_Database and property IB_Transaction set to TIBO_Transaction.
The transaction component used tiCommitted with AutoCommit set to false and AutoCommitRetains set to false.

The query from TIBOQuery is like this:
select d."id", d."idTbBeliM", d."idTbBarang", d."idTbGudang",
d."qty", d."satuan", d."konversi", d."qtyKecil",
d."hargaSat", d."disc", d."subTotal", d."ongkosKirim",
b."kode", b."nama", b."partNumber", b."satKecil"
from "tbBeliD" d
join "tbBarang" b on b."id"=d."idTbBarang"
where d."idTbBeliM"=:"id"
order by d."id"


The d."id" (BIGINT) field is a PK on "tbBeliD" table. I use UpdateSQL that generated automatically by TIBOQuery to make this TIBOQuery an updateable query. The update only for "tbBeliD" table.

I also have a generator called "genTbBeliD".

Now the problem is:
Everytime I insert a new record on "tbBeliD" (just still in insert condition, before post) why the field d."id" is automatically filled with an integer value that I don't know where it come from??

I'm not set any propoerty of TIBO_Query or TIBO_Database to automatically fill the "id" field from any generator, because I explicitly fill d."id" value onBeforePost of TIBO_Query with this statement:
if qrTbBeliDid.IsNull then
qrTbBeliDid.AsLargeInt:=conIBO.Gen_ID('"genTbBeliD"', 1);

Any clue??

TIA

[Non-text portions of this message have been removed]