It`s possible to create tMyStoreProc at runtime

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Daniel Fagnan
Posts: 58
Joined: Fri 13 Oct 2006 00:08

It`s possible to create tMyStoreProc at runtime

Post by Daniel Fagnan » Fri 04 Jan 2008 01:07

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 :?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: It`s possible to create tMyStoreProc at runtime

Post by Dimon » Fri 04 Jan 2008 09:16

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.

Post Reply