SetSchemaInfo + TFieldType

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
ti_duayfabi
Posts: 1
Joined: Wed 01 Oct 2014 13:07

SetSchemaInfo + TFieldType

Post by ti_duayfabi » Wed 01 Oct 2014 13:22

Hello,

I want to retrieve a table schema information with the "SetSchemaInfo" function.
All is fine, I get the columns names, ...
But how can I convert dbExpress types to delphi field type in a simple way?

I wrote a function with many tests and comparisons but it's a shame to maintain that for 3 differents databases.

I'm using delphi 2006 and delphi XE.

Any hint for me?

Thank you.
Kinds regards,

Fabien D.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SetSchemaInfo + TFieldType

Post by AlexP » Thu 02 Oct 2014 13:19

Hello,

This method returns not dbExpress type, but database field types. There is no "easy" way to get Delphi types by these types. You have to implement this functionality by yourself.

Eden0928
Posts: 62
Joined: Sun 22 Apr 2012 14:08

Re: SetSchemaInfo + TFieldType

Post by Eden0928 » Mon 27 Apr 2015 01:45

If you use DBX version 4(Delphi 2007 above).
You can get metadata with used DBX MetaData class.

Post Reply