Subject | Re: Correct Way to Use TIB_StoredProc |
---|---|
Author | duilio_fos |
Post date | 2003-04-19T21:32:53Z |
>it's actually more efficient to use TIB_DSQL and TIB_Query forexecutable and selectable stored procedures, respectively
I am playing with a remote Linux server accessed via a slow TCP/IP
connection.
The first thing I noted was how slow is the Prepare method of a
TIB_StoredProc.
Now I understand that I should use a TIB_DSQL.
Ok.
> With any of the components, the Params[] array gets clearedwhenever the component is unprepared. Unprepare occurs whenever you
change the SQL property or, in the case of TIB_StoredProc, the
StoredProcName.
What if I want to use the same SP with new parameters ?
The following code works:
Prepare;
ParamByName('parm1').Value:=SameValue1;
ParamByName('parm2').Value:=SameValue2;
ExecSQL;
But it is rather slow.
Is there any faster way to feed new parameters to a SP ?
Thank you
Duilio