Page 1 of 1

It`s possible to create tMyStoreProc at runtime

Posted: Fri 04 Jan 2008 01:07
by Daniel Fagnan
We are using a few storedprocedure in my application.
It`s possible to use one tMyStoreProc and changed Procedure name and reset parameters at run time.

We try
Proc.close;
Proc.Prepare;
Proc.StoredProcName := 'procOne';
Proc.executeProc;
s := Proc.params[0].asString;

We received error message If I assign this procedure to tStoredProc not at runtime
IF I used
Proc.executeProc;
s := Proc.params[0].asString;
All is Ok

Daniel Fagnan :?

Re: It`s possible to create tMyStoreProc at runtime

Posted: Fri 04 Jan 2008 09:16
by Dimon
Daniel Fagnan wrote:We try
Proc.close;
Proc.Prepare;
Proc.StoredProcName := 'procOne';
Proc.executeProc;
s := Proc.params[0].asString;
You should call TMyStoredProc.Prepare after specifying the StoredProcName property.