File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Print Oracle DBMS_OUTPUT in Java, HOW? Help Please! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Print Oracle DBMS_OUTPUT in Java, HOW? Help Please!" Watch "Print Oracle DBMS_OUTPUT in Java, HOW? Help Please!" New topic
Author

Print Oracle DBMS_OUTPUT in Java, HOW? Help Please!

Bo Lin
Greenhorn

Joined: Nov 17, 2002
Posts: 6
Hello, I have a stored procedure/trigger in oracle that does something like:
dbms_output.put_line("hello world")
dbms_output.put_line("bla bla")

Now I am using Java/JDBC to access this oracle stored procedure/trigger and want to display the dbms_output ("hello world" "bla bla") etc within the Java GUI. How do i do that? Any help will be greatly appreciated, thank you.
Bo
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

The answer is - U cannot.


Groovy
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

you can't print directly from the procedure as stated earlier, but you can save the message as a VARCHAR in the procedure and return it as an out parameter. In java you can read the out parameter and System.out.println() the return message.
Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Print Oracle DBMS_OUTPUT in Java, HOW? Help Please!
 
Similar Threads
How to Read DBMS_OUTPUT from a stored procedure in a java program
Calling a JMS client from Oracle Trigger
Access DBMS_OUTPUT from Java
Procedure created with compilation errors.
How to capture the exception in oracle trigger from Java client?