0
In a Mysql database I have a function (not Procedure) fully functional, I can access normally within heidisql.
At Delphi, I’ll tell you what
function ExecutarFuncaoSQL(sFuncao: string; aParams: array of Variant; conBanco: TFDConnection): Variant;
begin
with TFDCustomStoredProc.Create(nil) do
try
Connection := conBanco;
Result := ExecFunc(sFuncao, aParams);
finally
Free;
end;
end;
That’s according to what’s on the Delphi website ->Delphi documentation
However, when I try to execute I get the following error
---------------------------
Debugger Exception Notification
---------------------------
Project InterfaceAPI.exe raised exception class EMySQLNativeException with message '[FireDAC][Phys][MySQL] PROCEDURE gravarconsulta does not exist'.
---------------------------
Break Continue Help
---------------------------
Am I using the component the wrong way? Note: I want to avoid doing direct by select
Edit1: When I run this Function, it runs normally in BD(makes Inserts and select), but I still have problems related to this error returned. I made new tests using another component, but nothing done.
with TFDStoredProc.Create(nil) do
Bruno, that
gravarconsulta
that he’s screaming in the output, he’s being called from somewhere?– Rodrigo Tognin
I call [Function Executarfuncaosql] like -> Executarfuncaosql('gravarconsulta', [param1, param2 .....])
– Bruno Silva