Subject DSQL Executing
Author Yagi
Hi,

I have two questions.

1.

I use TIB_DSQL with te following statement:

SELECT NUMER
FROM STANOWISKA
WHERE NIECZYNNE = 0 AND STANOWISKA.ADRES = :ADRES

In my source code i'v got something like this

ibdsqlCM->Prepared = true;
ibdsqlCM->ParamByName("ADRES")->AsString = adres;
ibdsqlCM->Execute();

now, if SELECT statement returns no records (adres parameter is wrong) then
i got an error on ibdsqlCM.Execute():

ISC ERROR CODE:335544374

ISC ERROR MESSAGE:
attempt to fetch past the last record in a record stream

Am I doing something wrong?

2.

I set Prepared = true for TIB_DSQL or TIB_StoredProc before setting params.
Shuld I set Prepared=false after Execute() if i'm going to use another
parameters value and exec the statement again?


Thanks for reply

Yagi