Subject Re: [IBO] Prepare Question
Author Andreas Pohl
At the beginning I often use this pseudo code to call only one value from a
table:
with IB_DSQL do begin
sql.text:='select field from table where nr=:nr';
prepare;
while condition do begin
Params.ByName('nr').AsInteger:=IntValue;
execute;
// doing sth, with result set
end;
end;

This was working fine and quick. But in current release of IBO this code is
working only once. Second loop will cause an exception. Jason changed sth.
behind the scene to avoid a known IB bug. After changing TIB_DSQL to
TIB_Cursor above pseudo code is working well.

Mit freundlichem Gruss & Best Regards

Andreas Pohl
apohl@...
www.ibp-consult.com
----- Original Message -----
From: <dennis@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, February 23, 2001 9:05 AM
Subject: Re: [IBO] Prepare Question


> At 08:44 AM 02/23/2001 +0100, you wrote:
> >Isn't there a bug associated with SELECTs in DSQLs? Wouldn't it be
> >neccessary to rather use TIB_Cursor (or UnPrepare/Prepare between each
time
> >you call your TIB_DSQL)?
>
> You are probably thinking of the bug in InterBase with respect to serial
> calls to a stored procedure which returns data. The prepare/unprepare
> tactic is a way to avoid that problem. There is NO BUG in TIB_DSQL
related
> to this (or related to anything else, I dare say).
>
> Dennis McFall
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>