ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: how to get the real sql
Date Sat, 25 Dec 2004 02:23:54 GMT
The last Java project I used iBatis on had log4net setup to print out
useful statements during development:

DEBUG - Checked out connection 3976572 from pool.
DEBUG - {conn-100010} Connection
DEBUG - {pstm-100011} PreparedStatement: SELECT foo, bar FROM baz WHERE
foo = ?   
DEBUG - {pstm-100011} Parameters: [11]
DEBUG - {pstm-100011} Types: [java.lang.Integer]
DEBUG - {rset-100012} ResultSet
DEBUG - {rset-100012} Header: [foo, bar]
DEBUG - {rset-100012} Result: [11, 3]
DEBUG - Returned connection 3976572 to pool.

Those logs were very valuable in determining why things weren't working
the way I thought they should.

--- Clinton Begin <clinton.begin@gmail.com> wrote:

> If you could, that would be a driver level option.  iBATIS never
> merges the parameters for you, it lets the PreparedStatement 
> implementation do that.
> 
> What's the error you're getting?
> 
> Clinton
> 
> 
> On Fri, 24 Dec 2004 14:04:49 -0600, Vic Cekvenich <vin@friendvu.com>
> wrote:
> > I can't get a simple mapped statement to work:
> > 
> > SELECT
> >     max(msg_num) as msg_num
> >     from load_articles
> >     where club_id = #club_id#
> > 
> > Anyone know how can I get the real sql that executes with the parm
> and
> > real data returned in debug mode? (when I try in sql console it
> works
> > easily)
> > 
> > getSql?
> > getRowSet?
> > 
> > get the full sourcecode and trace?
> > 
> > tia,
> > .V
> > 
> > --
> > RiA-SoA w/JDNC <http://www.SandraSF.com> forums
> > - help develop a coomunity
> > My blog <http://www.sandrasf.com/adminBlog>
> >
> 


Mime
View raw message