Page 1 of 1

problem in dealing with TDBGrid

Posted: Tue 22 Apr 2008 10:29
by pkakkar
Hi,

I am getting a peculiar problem while retrieving records automatically using TDBGrid. Let me explain:

I have a form which has MSConnection1, MSQuery1, DataSource1 and TDBGrid1.

and in my test database, I have created a table 'contacts' which has follwing fields- 'GroupId, GroupName, Name, Email'. when i give the following query thru MSQuery1 editor 'select * from contacts' (and make the Active property as true) then it shows me all records automatically..but when I give the command 'select Email from contacts' then it gives me error message 'Field GroupName not found'.

I dont have any clue what the problem is? Pls advise.

regards
Pooja

Posted: Wed 23 Apr 2008 11:53
by Antaeus
Probably your query has fields created at design time. Try to delete the fields or recreate them corresponding your second query.