Page 1 of 1

how to display data in TDBGrid

Posted: Mon 21 Apr 2008 10:11
by pkakkar
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

how to display data in TDBGrid

Posted: Mon 21 Apr 2008 10:47
by pkakkar
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'

Posted: Wed 23 Apr 2008 11:41
by Antaeus
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.