[DUG] ADO and Serial/AutoInc fields not

Stacey Verner stacey at cjntech.co.nz
Thu May 4 10:00:45 NZST 2006


I have a simple query along the lines of

select *
from table

This is an Informix Database and the first column is a Serial column,
which is an auto incrementing integer field.

By default this field does not get created in a TADOQuery or
TADODataset. I can make it show buy turing on FieldDefs.HiddenFields or
by removing faHiddenCol from the fields properties.

The real problem is that if the field is not in the dataset the system
handles the serial value perfectly, so I can insert, post, uppdate post
and all is well. 

If the field is created in the dataset then the serial value is not
retrieved and I can't update a record that was recently inserted without
refreshing the dataset.

I can get the value of the serial using the informix api (we do this for
the BDE) but it seems like it should work if I get the right combination
of options, or fix a wee bug in ADO.

Does anybody know how to get this to work?

We are using Delphi 6 by the way.

Stacey



More information about the Delphi mailing list