recover a out var in a stored function

helmis

Member²
How to recover a out var of a stored function in a oracle database.

Code:
FUNCTION ALICE_DATA( NAME    IN VARCHAR2(25),NEW_NAME OUT VARCHAR2(25)) RETURN VARCHAR2
.
I want to recover NEW_NAME in Delphi, for that i declare a varible in a oracledataset & i call the proceddure, but the result of Oracle function is not Affected to this
oracledataset_Varible.

Thanks
 
If the SQL property of your TOracleDataSet is something like this:

Code:
begin
  :v_result := Alice_Data(:name     => :v_name,
                          :new_name => :v_new_name);
end;
then you can use TOracleData.SetVariable to set a value as input, and use TOracleData.GetVariable after the call to get a value as output:

Code:
MyDataSet.SetVariable('v_name', 'Something');
MyDataSet.ExecSQL;
NewName := MyDataSet.GetVariable('v_new_name');
Result  := MyDataSet.GetVariable('v_result');
 
Back
Top