-
oracle output
I 'm using Pro*C and have the following part in my code
EXEC SQL SAVEPOINT do_insert;
..............................
.............
EXEC SQL EXECUTE
BEGIN
INSERT INTO OWNER VALUES(:id_idn,:id_nam,:id_fnam,:id_cit);
COMMIT;
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
DBMS_OUTPUT.PUT_LINE(id number' || TO_CHAR(:id_idn) || 'allready exists' );
ROLLBACK TO do_insert;
END;
END-EXEC;
...............
.......
It works fine without errors but when the exception is raised it doesn't print the message in monitor while rollback works.So i think it's the SET SERVEROUTPUT ON thing tha i must use.But how can i use it inside Pro*c?I 'm on a Solaris system and if i enter sqlplus ,SET SERVEROUTPUT ON and quit the next time that i will enter it will be off.
-
SET SERVEROUTPUT ON is a SQL*Plus configuration command, that allows it to receive messages from the server. It applies to the SQL*Plus application only, andpersists until the app is closed. It would have no affect on the Pro*C application, nor the server itself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|