[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]
Unsupported operation
Moderators: gto, EgonHugeist