Mysql stored procedure using TZStoredProc

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
matejka
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 22.11.2005, 14:32
Location: Prague, Czech Republic
Contact:

Mysql stored procedure using TZStoredProc

Post by matejka »

Hi,
i'm using Zeos DBO 6.6.0, MySQL 5.0.41 and I need to retrieve result set from stored procedure. I've used TZStoredProc with params like this:

StoredProc1:=TZStoredProc.Create(nil);
StoredProc1.Connection:=Connection1;
StoredProc1.Params.CreateParam(ftInteger, 'param1', ftInput);
... other params added
StoredProc1.Open; // exception here

But exception of "Unsupported operation" occurs when calling Open (same error when calling Exec). I use only IN params in this procedure.

Is there anything wrong in my code?

thanks

Jiri Matejka
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

No... Nothing's wrong with your code. TZStoredProc is not supported for mysql, however. You should just use a TZQuery component (or TZReadOnlyQuery) ans use 'Call proc(param)' as the SQL statement.

There are plenty of examples on the forum already.

Mark
matejka
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 22.11.2005, 14:32
Location: Prague, Czech Republic
Contact:

Post by matejka »

Thanks for help, I'll try it.

Jiri Matejka
Post Reply