*
The moose likes JDBC and the fly likes How to connect DB log to a JTextArea ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to connect DB log to a JTextArea ?" Watch "How to connect DB log to a JTextArea ?" New topic
Author

How to connect DB log to a JTextArea ?

Michael Daines
Greenhorn

Joined: Oct 29, 2002
Posts: 4
I've looked around and not seen any code that seems to cover this. I've tried to figure it out myself, but just cannot get my head around it.
Basically, I have an application where I would like to have the DB log output written to a JTextArea (or other similar component is OK). My first assumption is to use the getLogWriter() method of DriverManager, but then I cannot figure out what to do with it. I'm sure that I'll have to programatically dump to the JTextArea on my own, but how? Or, am I barking up the wrong tree? The name "LogWriter" makes me think that it is only for me sending messages in!?! I want to get the DB's messages, not my own.
Any direction or guidance will be much appreciated.
Thanx,
msd
 
 
subject: How to connect DB log to a JTextArea ?