[solved] problem calling two different SP
Posted: Fri 02 Oct 2009 16:30
I have two different SPs:
These are called as follows:
In the design environment, the two results are popped up fine.
BUT, in the production (no delphi), The first SP works [var2=2.02], the second says "Parameter var1 not found".
After that SP test1 no longer works either, until I restart the client program. Normal mysql queries queries work fine, it only affects SPs (which I would really like to be able to use..)
I first noticed this is much more complex queries, and created the very simple examples above as a proof of concept. Seem like a bug to me?
D7 / MyDAC 5.9.0.51
Thanks in advance
Code: Select all
CREATE PROCEDURE test1(IN var1 INT, OUT var2 DOUBLE)
READS SQL DATA
BEGIN
SET var2=2.02;
END;
CREATE PROCEDURE test2(IN v1 INT, OUT v2 DOUBLE)
READS SQL DATA
BEGIN
SET v2= v1 + 10.02;
END;Code: Select all
with MyStoredProc1 do begin
try
Close;
StoredProcName:='test1';
ParamByName('var1').AsInteger:=10;
Execute;
ShowMessage('test1 var2=' +FieldByName('@var2').AsString);
finally
Close;
end;
end;
with MyStoredProc1 do begin
try
Close;
StoredProcName:='test2';
ParamByName('v1').AsInteger:=10;
Execute;
ShowMessage('test2 v2=' +FieldByName('@v2').AsString);
finally
Close;
end;
end;BUT, in the production (no delphi), The first SP works [var2=2.02], the second says "Parameter var1 not found".
After that SP test1 no longer works either, until I restart the client program. Normal mysql queries queries work fine, it only affects SPs (which I would really like to be able to use..)
I first noticed this is much more complex queries, and created the very simple examples above as a proof of concept. Seem like a bug to me?
D7 / MyDAC 5.9.0.51
Thanks in advance