Hello,
After installing the new driver 4.00.2 I noticed that my application has problems with executing funtions and stored procedurs on the MySQL Server 5.1.20. I use the following software Delphi 2005
On the mysql server I have a simple stored function with 2 input parameters for example integer(11) and a Char(15)
The result of this function is a double(15,4) an I call this function with the following delphi code
Function GetResult(Param1 : Integer; Param2 : String; MySQL : TSQLConnection) : Extended;
Var
QueryResult : TSQLStoredProc;
Begin
QueryResult:= TSQLStoredProc.Create(nil);
QueryResult.SQLConnection := MySQL;
QueryResult.StoredProcName := 'F_GET_RESULT';
QueryResult.Params.ParamByName('vparam1').value := Param1;
QueryResult.Params.ParamByName('vparam2').value := Param2;
QueryResult.ExecProc();
Result := QueryResult.Params.ParambyName('Result').AsFloat;
QueryResult.Free;
end;
When this code is executed I get the message that there is an error in my SQL syntax. Project project.exe raised exeception class EdatabaseError with message ‘Database Server Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ 100)’at line 1’.
It looks like it goes wrong when the parameters are send to the SQL server but I don’t know that for sure.
When I use the new dbexpmda.dll deliverd with this new version it goes wrong. When I use the old dbexpmda.dll deliverd with version 3, there is no problem executing the function.
Is there a way to solve this problem.