Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

printing queries in prepared statement

843859May 5 2006 — edited May 5 2006
I have a created a prepared statement. When I execute the query I get an error stating that the SQL isn't correct. I would therefore like to print out the statement so I can see what it looks like. Here is what my code is doing.

Create a query string with question marks.
Hand that string off to the preparedStatement constructor.
Modify that string using setString() One for every question mark.
Send the query off by calling executeQuery()

All I want to do is print out what the statement now looks like after the setStrings() are called.

Thanks,
-KAP
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 2 2006
Added on May 5 2006
1 comment
4,488 views