Delphi 6
I have the following store procedure
CREATE PROCEDURE `Usuario`(OUT xUser char(30)) NO SQL
begin
set xUser =SESSION_USER;
end $$
And I call the procedure from an OnNewRecord or BeforPost event in D6 with the following code
with SUsuario do begin
Execute;
ShowMessage(Params.ParamByName('xUser').AsString);
end;
And Im getting the error code 1414
#42000 Out or InOut Argument 1 for routine Usuario is not a variable or NEW pseudo-variable in before trigger
What am I missing ?
Sorry if many times I cant explain my problems but my english is poor.
Thanks
Jalin
How can I get an OUT parameter
-
jkuiper_them
- Posts: 28
- Joined: Thu 20 Dec 2007 14:48
For executing stored procedure you should use the TMyStoredProc component and set the TMyStoredProc.StoredProcName property to 'Usuario'.
After that you can use the following code:
After that you can use the following code:
Code: Select all
with MyStoredProc do begin
Execute;
ShowMessage(Params.ParamByName('xUser').AsString);
end;