problem displaying data from SQL server
Using C++ Builder 6, trying to display a table from an sql server.
TTable points to the table, a TDataSource uses the table as its dataset, and TDBGrid points to the TDataSource.
Grid only shows the numerical fields, ignoring all the text ones.
Does anyone know what's going on? Thanks.
[319 byte] By [
dsharp] at [2007-11-11 10:31:20]

# 1 Re: problem displaying data from SQL server
Can you see the fields names in the object inspector? If not, then probably the connection to the database has not been realized. Also try using TADOTable and other components from the ADO page for MS SQL server access. BDE (TTable relies on BDE) is not very good for non Borland databases.
Ivan** at 2007-11-11 20:58:35 >

# 2 Re: problem displaying data from SQL server
Looking at the table's FieldDefs, all the fields are there. However, I noticed that in the properties of the fields that aren't showing, the DataType is Unknown, whereas for the fields that do work, it says Integer, SmallInt, DateTime, etc. I tried changing Unknown to String, but it doesn't make any difference. Then when the table Active is set to false then true again, they go back to unknown.
dsharp at 2007-11-11 20:59:42 >

# 3 Re: problem displaying data from SQL server
I have just tried using the ADO components, and the problem has been fixed (what a relief!).
Many thanks for your help.
dsharp at 2007-11-11 21:00:34 >
