Hi Guys!
I have a script which connects to an Oracle Data Base using lr_db_connect, then executes a store procedure query but I am not able to see the result of the execution.
It says 'No Dataset was created' when I tried to execute the query using lr_db_executeSQLStatement. If it is a simple SELECT query it is straight forward but I have to run a stored procedure which is making the job little tricky.
I'd like to know what how I should add the query to see the response of the stored procedure after executing the query.
This is the sample script of what I'm trying:
Action()
{
lr_db_connect("StepName=CC_SP",
"ConnectionName=DB_Connect",
"ConnectionString=Provider=OraOLEDB.Oracle.1;Data Source={Hostname}:{PortNumber}/{DatabaseName};User ID={Username};Password={Password}",
"ConnectionType=OLEDB",
LAST);
lr_db_executeSQLStatement("StepName=AgreeIndexID",
"ConnectionName=DB_Connect",
"SQLStatement=var r refcursor; EXECUTE SAMPLE.GETAGREEMENTID (:r,'{AgreementIndexID}');PRINT r;",
"DatasetName=AgreeID",
LAST);
lr_db_getvalue("StepName=GetValues",
"DatasetName=AgreeID",
"Column=UID",
"Row=next",
"OutParam=MyOutputParam",
LAST);
lr_db_dataset_action("StepName=AgreeIndexPrint",
"DatasetName=AgreeID",
"Action=PRINT",
LAST);
return 0;
}