Subject Re: [IBO] SQL Error code = -804
Author mobra
1. to test if a dataset has rows returned or not, use dataset.isempty
2. in Tib_dsqlo don't use select statementes or stored procedures which
returns more data then 1 record. it's because of an Interbase bug.
use ib_query or ib_cursor instead
unpreparing the ib_dsql might help, but it's not the way how it should be
used. if you prepare and unprepare after, then there is no sense for use of
params. you will loose performance because of preparing evrey time.
(preparing is some kinf of compiling on server side).

best regards, m.
_______________________________________________
Who's the smartest man in the world?
Varro Istvan: http://mobra.16horse.org, mobra@...


----- Original Message -----
From: "Phil Henningsen" <PhilH@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, August 16, 2001 9:26 AM
Subject: [IBO] SQL Error code = -804


> 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
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>