how to display data in TDBGrid

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pkakkar
Posts: 5
Joined: Mon 14 Apr 2008 09:05

how to display data in TDBGrid

Post by pkakkar » Mon 21 Apr 2008 10:11

Hello,

I have TDBGrid, MSQuery, MSConnection and Datasource component on my form. I have linked it accordingly and specified database connections as well as database name too.

I have created a table by the name customer and added a field in it. Now I want to display the record automatically in TDBGrid. How can this be possible?

If I try to make the active property of MSQuery component to true, it dont let me and says "customer object already exists"..whats the option??

Regards
Pooja

pkakkar
Posts: 5
Joined: Mon 14 Apr 2008 09:05

how to display data in TDBGrid

Post by pkakkar » Mon 21 Apr 2008 10:47

hi,

just an update i am able to see only 'address' field records from my customer table...no other record....

and my SQL Query is 'select * from customer'

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 23 Apr 2008 11:41

Please, check whether your query has fields created at design time. To check the fields you should call the context menu of the query with the right button click, and select the Fields Editor item. If only field named "address" appears in the list, you can add other fields to the list. If you delete all fields from the list, you will see in the grid all fields from the dataset.
If this does not help, check in the same way whether your grid has columns created at design time.

Post Reply