The question on the DataType = ftInteger. why?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
zhbj
Posts: 11
Joined: Wed 10 Nov 2010 07:24

The question on the DataType = ftInteger. why?

Post by zhbj » Sun 10 Apr 2011 09:05

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?

AndreyZ

Post by AndreyZ » Mon 11 Apr 2011 09:47

Hello,

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

zhbj
Posts: 11
Joined: Wed 10 Nov 2010 07:24

Post by zhbj » Mon 11 Apr 2011 11:41

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.

zhbj
Posts: 11
Joined: Wed 10 Nov 2010 07:24

Post by zhbj » Mon 11 Apr 2011 11:46

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.

zhbj
Posts: 11
Joined: Wed 10 Nov 2010 07:24

Post by zhbj » Mon 11 Apr 2011 11:48

In addition, do you have no other way to distinguish ftAutoInc and ftInteger with Unidac ?

AndreyZ

Post by AndreyZ » Mon 11 Apr 2011 15:28

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.

zhbj
Posts: 11
Joined: Wed 10 Nov 2010 07:24

Post by zhbj » Wed 13 Apr 2011 02:00

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!

AndreyZ

Post by AndreyZ » Wed 13 Apr 2011 07:05

Feel free to contact us if you have any further questions about UniDAC.

Post Reply