How to call a Stored Procedure dynamically and return a Cursor as a prameter or return type in Pro C [message #193230] |
Fri, 15 September 2006 06:45 |
kjaka
Messages: 2 Registered: September 2006
|
Junior Member |
|
|
Hi,
I need help regard calling of stored procedure dynamically i.e. the name of the procedure and the parameters would not be known at compile time but always return a reference cursor as an output as mentioned below.
function SPnameXYZ ( param1 in varchar2,param2_cursor out Ref Cursor
)RETURN number;
i atleast want to know how cursor would be returned from the stored procedure above into a Pro*C program here is a little code what im doin about calling it dynamically
EXEC SQL BEGIN DECLARE SECTION
char* param1;
sql_cursor param2_cursor;
char SpString[] = "BEGIN pkgname.SPnameXYZ(:param1, :param2_cursor ); END;"
EXEC SQL END DECLARE SECTION
EXEC SQL PREPARE stmt FROM :SpString;
EXEC SQL EXECUTE stmt;
i need a way how it could be done tried alot plz help
its urgent
|
|
|