Subject Re: [IBO] Prepare + unprepare + close with IB_Query or IB_Cursor?
Author sdbeames
> As a matter of curiosity, how are you using TIB_DSQL to fetch
anything?
>
> regards,
> Helen Borrie (TeamIBO Support)

A typical sequence I'm using would be....

DMod->IB_DSQL1->SQL->Clear();

DMod->IB_DSQL1->SQL->Add("select J.CLIENTNO,
C.FULL_NAME, J.ACCNT_ID, A.ACCOUNT, A.SPEEDTYPE, A.CLASS
from JOBS J join CLIENTS C on C.CLIENTNO = J.CLIENTNO join
ACCOUNTS A on A.ACCNT_ID = J.ACCNT_ID where J.JOBNO = :jobNum");

DMod->IB_DSQL1->ParamByName("jobNum")->AsString =
JobNoEdit->Text;

DMod->IB_DSQL1->ExecSQL();

RequestorEdit->Text = DMod->IB_DSQL1->FieldByName
("FULL_NAME")->AsString;

AccountEdit->Text = DMod->IB_DSQL1->FieldByName
("ACCOUNT")->AsString;

SpeedtypeEdit->Text = DMod->IB_DSQL1->FieldByName
("SPEEDTYPE")->AsString;

ClassEdit->Text = DMod->IB_DSQL1->FieldByName
("CLASS")->AsString;

This seems to work fine. I just wanted to be sure I wasn't leaving
unused resources on the server by not explictly
Preparing/Unpreparing, which I think you have confirmed I'm not(?).

Thanks,
Steve