Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> dbms_output in PROC
Hello everybody,
i'm quite a newbie in Pro*C.
I have a Pro*C program that calls a stored procedure.
I would like to trace to debug my stored procedure (already tested in
SQLPLUS) in that pro*c context.
I tried something like the code below but the last call to get_line fails and returns me the following error:
"ORA-01405:fetched column value is NULL"
I tried things with get_lines, etc. but did not succeed.
Any help (with a demo code working) would be REALLY appreciated.
Thank you,
LK
EXEC SQL EXECUTE BEGIN DBMS_OUTPUT.ENABLE(2000); -- buffer size defaults to 2000 END;
EXEC SQL EXECUTE BEGIN /* here : code that calls dbms_output.put_line*/ DBMS_OUTPUT.PUT_LINE('Test 1'); DBMS_OUTPUT.PUT_LINE('Test 2'); DBMS_OUTPUT.PUT_LINE('Test 3'); END;
EXEC SQL BEGIN declare section; VARCHAR line[256]; int status; EXEC SQL END declare section; for(;;) { EXEC SQL EXECUTE BEGIN DBMS_OUTPUT.GET_LINE( :line, :status ); END; END-EXEC; if ( status ) break; printf( "%d %.*s\n", status, line.len, line.arr ); } ------------------------Received on Wed Apr 26 2006 - 08:58:10 CDT
![]() |
![]() |