TQuery EDatabaseError field not found (but yet...)
From: Alexandre Leclerc (aleclerc__at__hotmail_._com)
Date: 07/06/04
- Next message: Alexandre Leclerc: "Re: TQuery EDatabaseError field not found (but yet...)"
- Previous message: Viatcheslav V. Vassiliev: "Re: ADO Dataset Closing exception error"
- Next in thread: Alexandre Leclerc: "Re: TQuery EDatabaseError field not found (but yet...)"
- Reply: Alexandre Leclerc: "Re: TQuery EDatabaseError field not found (but yet...)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 06 Jul 2004 10:37:31 -0400
Hi all,
I've look arround for a while but found no help for this weird problem.
Using Delphi 3:
I use a TQuery with PostgreSQL ODBC component to get data from the DB
and this is working great. But for a specific query I'm getting this
problem: I can read the first result, but when I come to the next one,
this is telling me the field does not exist. But when I add a watch,
this is working (before I get the error).
Here is the code bellow, and the error message:
--code-begin--
qryInfPatch.SQL.Clear;
qryInfPatch.SQL.Add('SELECT * FROM inf_patch.yarn WHERE expire_date
IS NULL;');
qryInfPatch.Active := True;
qryInfPatch.First;
while not qryInfPatch.Eof do
begin
Inc(count);
sgYarn.RowCount := count + 1;
sgYarn.Rows[count].Add(VarToStr(qryInfPatch['yarn_id']));
//... other fields...same code
sgYarn.Rows[count].Add(VarToStr(qryInfPatch['cn_desc']));
qryInfPatch.Next;
end;
qryInfPatch.Active := False; //close query
--code-end--
So the first loop is working good, but when begining the next loop, this
is telling me 'EDatabaseError ... field 'yarn_id' not found...'. I have
no clue of what is going on, since the *same* code works great for other
tables.
Thanks for any help!
-- Alexandre Leclerc
- Next message: Alexandre Leclerc: "Re: TQuery EDatabaseError field not found (but yet...)"
- Previous message: Viatcheslav V. Vassiliev: "Re: ADO Dataset Closing exception error"
- Next in thread: Alexandre Leclerc: "Re: TQuery EDatabaseError field not found (but yet...)"
- Reply: Alexandre Leclerc: "Re: TQuery EDatabaseError field not found (but yet...)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|