Subject | RE: [IBO] SQL Error code = -804 |
---|---|
Author | Thomas Steinmaurer |
Post date | 2001-08-16T06:32:23Z |
Hi Phil,
if Prepared then Unprepare;
Thomas
> Actually, 2 questions.Try IsEmpty.
>
> 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,You always need to explicit Unprepare your statement before executing.
>
> 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;
if Prepared then Unprepare;
> ParamByName('PROFILE_ID').AsInteger :=Hope this helps!
> 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.
>
Thomas