Re: Display SQL from Java Prepared Statement

From: vanayya <nurmi_isnayati(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Display SQL from Java Prepared Statement
Date: 2011-08-22 03:00:06
Message-ID: 1313982005992-4721914.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

But its not working for me ..

I have written like this :

/
PreparedStatement pStatement = null;
....

pStatement = connection.prepareStatement(" update tblMember set address =
?");
pStatement.setObject(i++, "Jl. Setya Budi");
System.out.println("query : " + pStatement.toString());

/

And the result :

/query : org(dot)apache(dot)tomcat(dot)dbcp(dot)dbcp(dot)DelegatingPreparedStatement(at)1c1de1c/

I need log query from pStatement, Does anyone can help me ?

regard,

mimi

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Display-SQL-from-Java-Prepared-Statement-tp2175579p4721914.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message JavaNoobie 2011-08-22 04:44:27 Re: how to Escape single quotes with PreparedStatment
Previous Message Radosław Smogura 2011-08-21 10:45:14 Re: how to Escape single quotes with PreparedStatment