Page 1 of 1

The question on the DataType = ftInteger. why?

Posted: Sun 10 Apr 2011 09:05
by zhbj
Hello, visit access the database, a table of a field data type is automatically numbered, with TADOConnection, TADOQuery access, the return DataType = ftAutoInc,

but with TUniConnection, TUniQuery visit but return is ftInteger, somehow?

Posted: Mon 11 Apr 2011 09:47
by AndreyZ
Hello,

It's a standard UniDAC behaviour. Please describe why you need this functionality.

Posted: Mon 11 Apr 2011 11:41
by zhbj
Thanks to reply, because the import data, the "auto-numbered" fields are not imported, if the auto-numbered fields and integer fields are usually shown as ftInteger, rather than ftAutoInc and ftInteger, which can not be confirmed Need to skip, which need to fill in the data.

Posted: Mon 11 Apr 2011 11:46
by zhbj
AndreyZ wrote:Hello,

It's a standard UniDAC behaviour. Please describe why you need this functionality.
Thanks to reply, because the import data, the "auto-numbered" fields are not imported, if the auto-numbered fields and integer fields are usually shown as ftInteger, rather than ftAutoInc and ftInteger, which can not be confirmed Need to skip, which need to fill in the data.

Posted: Mon 11 Apr 2011 11:48
by zhbj
In addition, do you have no other way to distinguish ftAutoInc and ftInteger with Unidac ?

Posted: Mon 11 Apr 2011 15:28
by AndreyZ
You can use the following code to determine if a field is autoincrement:

Code: Select all

TCRFieldDesc(UniQuery.GetFieldDesc('fieldname')).IsAutoIncrement
Note that you should add the CRAccess unit to the USES clause of your unit.

Posted: Wed 13 Apr 2011 02:00
by zhbj
AndreyZ wrote:You can use the following code to determine if a field is autoincrement:

Code: Select all

TCRFieldDesc(UniQuery.GetFieldDesc('fieldname')).IsAutoIncrement
Note that you should add the CRAccess unit to the USES clause of your unit.
Thanks!

Posted: Wed 13 Apr 2011 07:05
by AndreyZ
Feel free to contact us if you have any further questions about UniDAC.