Subject | SQL Error code = -804 |
---|---|
Author | Phil Henningsen |
Post date | 2001-08-16T06:26:54Z |
Actually, 2 questions.
First, a quickie: What is the "proper" way to test for "is the result set
empty?"
RowsSelected, RowsAffected, EOF and BOF, try..except, or ??
Second,
This seems to be a simple, direct TIB_DSQL, but on the 2nd execution of it
(and thereafter), I receive:
SQL Error code = -804
SQLDA missing or incorrect version, or incorrect number/type of variables.
I have read Geoff Worboy's post of Jul 25, 2001 1:30 pm and "none of the
above worked"
The SQL.Text is:
select * from PROFILES
where PROFILE_ID = :PROFILE_ID
The Delphi code is also simple:
with ThorProf_DSQL do
try
if not Prepared then Prepare;
ParamByName('PROFILE_ID').AsInteger :=
ThorSubsQuery.FieldByName('PROFILE_LIST').AsInteger;
Execute;
slTmp.CommaText := FieldByName('Parameters').AsString;
// [snip]
except
on E:Exception do
ShowReadErrorMsg('ThorProf_DSQL',E);
end;{with ThorProf_DSQL, try..except}
Does the TIB_DSQL remain Active/Open & need Closing? If so, I can't find a
Close method.
Environment is
Win2000
C:\WinNT\system32\gds32.dll 9/6/1999 6:56 AM 339 KB (*only* copy on any
hard drive)
Server is remote via TCP/IP
Server OS is Win2000
IB Server: WI-V5.5.0.742
Thanks for your help!
Phil Henningsen
First, a quickie: What is the "proper" way to test for "is the result set
empty?"
RowsSelected, RowsAffected, EOF and BOF, try..except, or ??
Second,
This seems to be a simple, direct TIB_DSQL, but on the 2nd execution of it
(and thereafter), I receive:
SQL Error code = -804
SQLDA missing or incorrect version, or incorrect number/type of variables.
I have read Geoff Worboy's post of Jul 25, 2001 1:30 pm and "none of the
above worked"
The SQL.Text is:
select * from PROFILES
where PROFILE_ID = :PROFILE_ID
The Delphi code is also simple:
with ThorProf_DSQL do
try
if not Prepared then Prepare;
ParamByName('PROFILE_ID').AsInteger :=
ThorSubsQuery.FieldByName('PROFILE_LIST').AsInteger;
Execute;
slTmp.CommaText := FieldByName('Parameters').AsString;
// [snip]
except
on E:Exception do
ShowReadErrorMsg('ThorProf_DSQL',E);
end;{with ThorProf_DSQL, try..except}
Does the TIB_DSQL remain Active/Open & need Closing? If so, I can't find a
Close method.
Environment is
Win2000
C:\WinNT\system32\gds32.dll 9/6/1999 6:56 AM 339 KB (*only* copy on any
hard drive)
Server is remote via TCP/IP
Server OS is Win2000
IB Server: WI-V5.5.0.742
Thanks for your help!
Phil Henningsen