get the query created by PreparedStatement - Mailing list pgsql-jdbc

From Eric Frazier
Subject get the query created by PreparedStatement
Date
Msg-id 2.2.32.20010319012645.00757454@kwinternet.com
Whole thread Raw
Responses Re: get the query created by PreparedStatement  (Garry Thuna <garry.thuna@tacticalExecutive.com>)
List pgsql-jdbc
Hi,

Is there an easy way to get the actual query sent by a preparedstatement
without contstructing it yourself?

I have a long case statment with many setXXX and the whole of my query is
basicly just

INSERT INTO TABLE(?,?,?,?,?,?,?,?,?)

along with those setXXX statments.

I would like to be able to print out to a log what the resulting SQL ends up
being. But I don't see any way to do that. Isn't there some part of the JDBC
API that will give you the last query executed or something like that?


Thanks,

Eric


Frazier Consulting
http://www.kwinternet.com/eric
(250) 655 - 9513




pgsql-jdbc by date:

Previous
From: Robert LaPreze
Date:
Subject: database URL
Next
From: Aaron Brashears
Date:
Subject: Re: database URL