I need to read metadata for the fields (columns) of the tables that I'm dealing with. I am doing this as below, this being a trivial port from another project of mine which [successfully] used C++, RAD Studio 2007 and CodeGear's dbExpress driver for SQL Server.
The code below does not generate any errors, it just causes EOF to be True and, hence, no metadata to be read.
I have stepped into Borland's debug code but it all looks normal and I hit dead ends when their code accesses the driver interface (apparently).
Code: Select all
SQLDataSet.SetSchemaInfo( stColumns, sTableName, '' );
SQLDataSet.Active := True;
try
SQLDataSet.First;
iFldCount := SQLDataSet.Fields.Count;
while not SQLDataSet.Eof do
begin
SQLDataSet.Next;
end;
finally
SQLDataSet.Active := False;
end;
SQLDataSet.SetSchemaInfo( stNoSchema, sTableName, '' );