Re: [JDBC] get the query created by PreparedStatement

2001-03-20 Thread Garry Thuna
Eric, I have always wanted the same thing for both debugging as well as logging. The best I have been able to come up with is a wrapper class to PreparedStatement. This works well with the exception that some of the methods of PreparedStatement are depreciated and you will always get a com

Re: [JDBC] get the query created by PreparedStatement

2001-03-20 Thread Eric Frazier
Hi, This does work, both with the postgress and mysql drivers. But I do need to make SURE it will work no matter the driver, so it sounds like Garry's code would be the best bet for that. Thoughts? Thanks, Eric >How about the toString() method ;-) > >Ok, may not be standard JDBC, but: > >P

Re: [JDBC] get the query created by PreparedStatement

2001-03-20 Thread Peter T Mount
Quoting Garry Thuna <[EMAIL PROTECTED]>: > Eric, > > I have always wanted the same thing for both debugging as well as > logging. How about the toString() method ;-) Ok, may not be standard JDBC, but: PreparedStatement ps = ; // later org.postgresql.jdbc2.PreparedStatement ps2 = (o

Re: [JDBC] get the query created by PreparedStatement

2001-03-20 Thread Garry Thuna
Eric, I have always wanted the same thing for both debugging as well as logging. The best I have been able to come up with is a wrapper class to PreparedStatement. This works well with the exception that some of the methods of PreparedStatement are depreciated and you will always get a compiler