ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Douglas Smith" <douglas.sm...@aciwebs.com>
Subject RE: viewing generated SQL without Log4Net?
Date Tue, 24 Oct 2006 03:00:13 GMT
Hi Ron,

1) I have some complicate dynamic queries, and I want to make sure I am
creating the expected SQL.  

2) In general, I would like an easy way to get the generated SQL out of
iBatis, and use it any way *I* want in the context of my app, and not
have to rely on Log4Net (although it may be a perfectly good tool).  I
may want to do a custom log or use or display the SQL in other ways, for
tracing, debugging, performance/load testing, etc.

For example, I think it would be a nice feature to be able to do
something like this:

	IDBCommand MyLastCommand = Mapper.LastCommand;

3) I have not seen anything about the console logger, in the
documentation, help files, wiki etc.  Sounds like a good start.  Where
do I find it?  I guess I will take another look at the web site....


-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Monday, October 23, 2006 10:12 PM
To: user-cs@ibatis.apache.org
Subject: Re: viewing generated SQL without Log4Net?

Logging is currently the most straightforward way of viewing what's
being sent to the database. IBatisNet comes with a Console logger so you
technically don't need to setup log4net to view the sql inside of

What exactly are you wanting to do?

----- Original Message ----

From: Douglas Smith <douglas.smith@aciwebs.com>

To: user-cs@ibatis.apache.org

Sent: Monday, October 23, 2006 1:04:12 PM

Subject: viewing generated SQL without Log4Net?

Hi guys,


   I have read the manual, and the forums, and it looks like the only
way to view the generated/prepared SQL statements is to log them, using


   Is this correct?  Is there a way to get to the CommandText  property
of DBCommand object, for any given ISQLMapper command (QueryFor...,
insert, select, etc).


   Is it possible to expose this property by tweaking the source code?


   I would really love to view the prepared SQL statement on the NUnit
console output, and possibly elsewhere.





View raw message