problem in dealing with 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

problem in dealing with TDBGrid

Post by pkakkar » Tue 22 Apr 2008 10:29

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

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

Post by Antaeus » Wed 23 Apr 2008 11:53

Probably your query has fields created at design time. Try to delete the fields or recreate them corresponding your second query.

Post Reply