get the query created by PreparedStatement

From: Eric Frazier <ef(at)kwinternet(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: get the query created by PreparedStatement
Date: 2001-03-19 01:26:45
Message-ID: 2.2.32.20010319012645.00757454@kwinternet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aaron Brashears 2001-03-19 06:55:44 Re: database URL
Previous Message Robert LaPreze 2001-03-16 18:11:35 database URL