I've just tried to request the column type of an mdColumns metadata request.
I have many different datatypes used in my tables, but every request to self.FMetadata.FieldByName('DATA_TYPE').AsInteger returns 0 (for MSSQL/ADO connections).
On line 1584 in ZDbcAdoMetadata.pas I have found the following lines commented out:
Code: Select all
// Datatype will come from the adorecordset
// Result.UpdateShortByName('DATA_TYPE',
// Ord(ConvertAdoToSqlType(GetShortByName('DATA_TYPE'))));
Is it intended that the code is commented out? If yes, what is the best generic way to determine the datatype of columns in a Firebird or MSSQL database?