This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes Prepare Statement? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Prepare Statement?" Watch "Prepare Statement?" New topic
Author

Prepare Statement?

umar hathab
Ranch Hand

Joined: Aug 20, 2001
Posts: 52
Can any one tell me how to send a prepared statement to the log file whith set values..?
For example
Statement stmt=Connection.prepareStatement(update emp set empno=? where empid=?)
stmt.setInt(100);
stmt.setInt(1000);

I want to see my log file contains some statement like update emp set empno=100 where empid=1000.
I want to know how to S.O.P this to log file?
Thanks,
A.Umar


Sun Certified Java Programmer for Java 2.0 (93%) <p>----Winners always make the learning a habit
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Prepare Statement?