Page 1 of 1
About TMyStoredProcedure ?
Posted: Thu 29 Sep 2005 12:09
by bumblebee
Hi...
MyDac version is 3.55.0.22
my stored procedure is ;
CREATE PROCEDURE `xproc`(in param1 Int, in param2 Int, inout param3 Int)
begin
set @a1 = 10*param1;
set @a2 = 11*param2;
set @a3 = 12*param3;
end;
i m execute TMystoredprocedure in delphi and throw exception :
out or inout argument 3 for routine muhasebe.xproc is not a variable...
what s this?
how to use TMyStoredProcedure ?... your docs is not enough...
thanks for....
Posted: Fri 30 Sep 2005 09:51
by Ikar
MySQL does not return parameters to client. Try to declare server variable and place param value to it. Then use SELECT to get its value.
procedures?
Posted: Mon 03 Oct 2005 10:57
by bumblebee
Hi Ikar;
can you give examples?

Posted: Thu 06 Oct 2005 08:22
by Ikar
Code: Select all
CREATE PROCEDURE `xproc`(in param1 Int, in param2 Int, inout param3 Int)
begin
set @a1 = 10*param1;
set @a2 = 11*param2;
set @a3 = 12*param3;
set param3 = @a3;
end
MyDAC 3.55:
Code: Select all
MyQuery.SQL.Text := 'SET @p3 = 5';
MyQuery.Execute;
MyQuery.SQL.Text := 'CALL xproc(:param1, :param2, @p3)';
MyQuery.Execute;
MyQuery.SQL.Text := 'SELECT @p3';
MyQuery.Execute;
MyDAC 4.0:
Code: Select all
MyQuery.SQL.Text := 'SET @p3 = 5; CALL xproc(:param1, :param2, @p3); SELECT @p3';
MyQuery.Execute;
Feature request
Posted: Wed 17 Jan 2007 10:34
by ajasja
Hello!
Could you make TmyStoredProc generate the extra select SQL statements implicitly and then move the result into the parameters? Maybe you only have to modify the stored procedure generator?
So that myDac users could handle the OUT and INOUT parameters transparently. (We wouldn't/shouldn't even know that MySQL doesn’t return parameters)
Best regards,
Ajasja Ljubetič
Posted: Wed 17 Jan 2007 11:06
by Antaeus
Support for output parameters has been added to the new version of MyDAC. Beta versions of MyDAC 5 for Delphi 7 and Delphi 2006 are now available for download from
here
Posted: Wed 17 Jan 2007 13:24
by ajasja
Great, thanks.