Board index » delphi » Problem after modifying the query.

Problem after modifying the query.


2003-10-14 05:44:07 PM
delphi35
I've this query (QueryGrid)
SELECT DISTINCT ....,count(distinct passenger_booking.client_id) where....
I've a TDbGrid, in wich a field's source is COUNT. I have then modified the
The query this way:
SELECT DISTINCT ....,count(distinct passenger_booking.client_id) as
PASSCOUNTER where....
I've also modified the TDBGRID. Now the field's source is PASSCOUNT, but as
soon as I open the query, I get an error message:
EDataBaseError...'QueryGrid': field 'COUNT' not found. Processus stopped....
How to fix it ???
 
 

Re:Problem after modifying the query.

Bob Bedford writes:
Quote
I've also modified the TDBGRID. Now the field's source is PASSCOUNT,
but as soon as I open the query, I get an error message:
EDataBaseError...'QueryGrid': field 'COUNT' not found. Processus
stopped....

How to fix it ???
You probably have some persistent fields defined from the old query.
Try deleting and re-adding all of your persistent TFields.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
Everything You Need to Know About InterBase Character Sets:
delphi.weblogs.com/stories/storyReader$306
 

Re:Problem after modifying the query.

Hi Craig, thanks for help-
Quote
You probably have some persistent fields defined from the old query.
Try deleting and re-adding all of your persistent TFields.
Do you mean the FieldName property of each column of the TDbGrid ???? as I
can't find out any similar field on the query. I am using TIbQuery....and the
database is opened at runtime...(but don't think it should change anything).
BoB
 

Re:Problem after modifying the query.

Bob Bedford writes:
Quote
Do you mean the FieldName property of each column of the TDbGrid ????
No. I mean persistent TFields. Double-click the dataset. Do you see
fields in the list? If so, delete all of them, then right click and
choose Add all fields.
-Craig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : delphi.weblogs.com
Useful articles about InterBase and Delphi development:
delphi.weblogs.com/articles