Unsupported operation

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
hgomez
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 24.10.2008, 17:40

Unsupported operation

Post by hgomez »

[font=Tahoma]
Hello to everyone, I need some help to resolve a problem working with ZeosLib 6.6.3 stable.

I´m developing an application in Delphi 2007, executing a MySQL Stored Procedure but I got the following error message "Unsupported operation" when execute TZStoredProc.ExecProc method.

(* **************************************************** *)
(* I´m using a TZStoredProc with the following Stored Procedure: *)
(* **************************************************** *)

CREATE DEFINER=`root`@`localhost` PROCEDURE `spuInsertarMovimiento`(txnut int, txcod varchar(4))
BEGIN
insert tbl_movimiento values( txnut, txcod );
END

(* **************************************************** *)
(* My application code in Delphi 2007: *)
(* **************************************************** *)
var
spData: TZStoredProc;
dbConn: TZConnection;
begin
Result := DBR_ERROR;
try
dbConn := TZConnection.Create( Self );
try
dbConn.Connected := false;
dbConn.HostName := 'localhost';
dbConn.Port := 3306;
dbConn.Protocol := 'mysql';
dbConn.Catalog := 'visionamos';
dbConn.User := 'root';
dbConn.Password := 'xxxxxx';
dbConn.Connected := true;

spData := TZStoredProc.Create( Self );

try
spData.Connection := dbConn;
spData.StoredProcName := 'spuInsertarMovimiento';

spData.Params.Clear;
spData.Params.CreateParam( ftInteger, '0', ptInput );
spData.Params[ 0 ].Size := 0;
spData.Params[ 0 ].Value := 123456;

spData.Params.CreateParam( ftString, '1', ptInput );
spData.Params[ 1 ].Size := 4;
spData.Params[ 1 ].Value := 'CODE';

spData.ExecProc; // Right here is raised the message error

Result := DBR_SUCCESS;

finally
spData.Free;
end;

finally
dbConn.Connected := false;
dbConn.Free;
end;

except
on e: Exception do
begin
raise Exception.CreateFmt( 'ERROR: Executing (%s)', [ e.Message ] );
Result := DBR_ERROR;
end;
end;

P.D.
In my machine are installed Windows Vista Home Premium SP1 (Spanish), MySQL 5.0.67 community-nt via TCP/IP (InnoDB Engine)

Thank so much for your help.
hgomez

[/font]
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Sorry,

This ZStoredProcedure component isn't implemented for mysql (yet). So you'll have to do it using TZQuery and it's execsql method. There are quite some threads about this issue in the mysql part of this forum.

Mark
Image
woolfik
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 29.06.2009, 09:37

Post by woolfik »

And what about PostgreSQL it is the same problem.
Post Reply