Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with stored procedure and ProC
Hi,
I would appreciate some help from anybody who is familiar will calling stored procedures from ProC.
The problem for me is that the stored procedure which I need to call takes 3 IN arguments (easy) and 1 OUT argument (hard). Below is the code
which I am using, but always it complains about the OUT variable either not being bound or there being no SELECT. This all seems so simple but neither of the two versions of code works!
Thank in advance for any ideas.
// TRY 1
EXEC SQL BEGIN DECLARE SECTION;
char *bla; char *start; char *end; varchar op[ 1024 ];
EXEC SQL EXECUTE
BEGIN sp_tv( :bla, :start, :end, :op ); END;
printf("[%s] %d\n", op, sqlca.sqlcode );
// TRY 2
sprintf( sql, "BEGIN sp_tv( 'bla', '01/01/1990 00:00:00', '02/01/1990
00:00:00', :op ); END;" );
EXEC SQL DECLARE CD STATEMENT; EXEC SQL PREPARE CD FROM :sql; EXEC SQL EXECUTE CD USING :op;
--
Alan Barclay
Schlumberger GeoQuest
barclaya_at_aberdeen.geoquest.slb.com
Received on Wed Apr 08 1998 - 06:13:45 CDT