Missing field
Posted: Mon 09 Jan 2012 14:24
When I fill the CommandText property of a TSqlDataset like this:
and I open it, the dataset has no fields (FieldCount = 0). To correct the problem I have to cast the empty string constant to a varchar, like this:
Now I get one field, as expected.
The problem occurs on a SQL Server 2000 database, not on SQL Server 2008. In both cases I'm using Delphi 7.1, dbexpsda.dll version 4.55.0.19
Code: Select all
SqlDataset.CommandText := 'select ''''';
Code: Select all
SqlDataset.CommandText := 'select cast('''' as varchar(20))';
The problem occurs on a SQL Server 2000 database, not on SQL Server 2008. In both cases I'm using Delphi 7.1, dbexpsda.dll version 4.55.0.19