A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Obtaining The SQL from a prepared Statement
Joined: Jan 17, 2002
Aug 20, 2007 10:36:00
I have a Prepared Statement
insert into person(firstname,lastname) values(?,?);
and I am setting the firstname and lastname via
and the last step is Preparestmt.executeUpdate();
The question i have is i am trying to obtain the SQL executed against the Database,after doing the set and executing the executeUpdate command which method can i use?
Joined: Jul 08, 2004
Aug 20, 2007 11:30:00
I do not know any direct way to do this, but you can start for example SQL server profiler and monitor the statement that is going to be executed in the database.
Maybe you could enable logging in the
driver level and see the prepared statement . to enable logging take a look at your driver manual and documenation.
Software Engineer -
Joined: Dec 20, 2006
Aug 20, 2007 12:12:00
You can use Ryan Bloom's
OCUP UML fundamental
I agree. Here's the link:
- it saves me about five hours per week
subject: Obtaining The SQL from a prepared Statement
Help Me Demistify this
Not in aggregate function or group by clause - HSQLDB doesn't like the ORDER BY clause
Insert Query using select statement
Search on name using LIKE statement
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013