ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucy Fang <f...@acs.rutgers.edu>
Subject RE: Are there any ways to view the SQL mapping statements?
Date Thu, 16 Dec 2004 22:38:17 GMT
Brice,

It does solve my problem.

Thanks.

Lucy

-----Original Message-----
From: Brice Ruth [mailto:bdruth@gmail.com] 
Sent: Thursday, December 16, 2004 3:50 PM
To: fang@acs.rutgers.edu
Cc: ibatis-user-java@incubator.apache.org
Subject: Re: Are there any ways to view the SQL mapping statements?


You'll need to use $campusCode$ to use the literal value, otherwise iBATIS
will quote the string, which won't work. This doesn't directly answer your
question, but it should solve your problem :)

To answer your question, yes, you can use log4j to view the SQL statements
that are sent to the database. The iBATIS documentation contains information
on how to set this up, and of course the log4j website and the
commons-logging documentation (which is what iBATIS
uses) will be your friends.

I've also heard a product called P6spy mentioned which does this at the JDBC
driver level, if I'm not mistaken. I don't have any experience with it, tho.

Regards,
Brice


On Thu, 16 Dec 2004 14:25:08 -0500, Lucy Fang <fang@acs.rutgers.edu> wrote:
>  
> 
> Hi,
> 
> Are there any ways I can view the SQL mapping statements after created 
> a dynamic SQL statement and passed all of parameters to it?
> 
> I have a dynamic SQL mapping statement with 
>         select * from campus where campuscode in #campusCode#
> if I use campuscode in (03,04), it works good. But if I use the parameter
> campusCode replace the value, it doesn't work. I pretty sure the parameter
> value is "(03,04)". 
> 
> The database I am using is Oracle and iBatis is SQL Map 2.0.
> 
> Thanks.
> 
> Lucy


Mime
View raw message