I've see the log, and It's fine, but I want to store some especial INSERTS, UPDATES and DELETES that the application is executing, to create a file with that especial statements.
Have I read the log and get lines from it? hummmm Example select * from table <dynamic WHERE> <isNull prepend = AND > FIELD = #field# </isNull> </dynamic> iBatis knows if the FIELD is null and then the SQL may be select * from table or select * from table where FIELD = ? I want to know the sql in the implementation (sqlmapdao) after the execution (or before, I don't mind). Now I'm seeing if the parameters are null and doing the sql string by myself, but if I could get the sql from iBatis..... much better ;-) Thanks and excuse my english ;) --- Nathan Maves <[EMAIL PROTECTED]> escribió: > The logging will give you all the information that > you need. > > Ex. > > select * from table where id = #id# > > The logging will show you the PS > > select * from table where id = ? > > And then show you the parameters. You will be able > to see just what > is being called. The only gotcha is that you can > not copy and paste > the sql in one shot. You have to do the > substitution for the > parameters yourself. > > Give it a try :) > > > Nathan > > > On Mar 8, 2006, at 10:09 AM, Lurtz Ugluk wrote: > > > I've look the link above and I read "Why? Because > the > > only information we have available is the > > PreparedStatement and the parameters." > > That's that I need (I think ;-) ), with the > > preparedStatement I can get the SQL that I will > > execute, can't I? > > How can I get that PreparedStatement and its > > parameters at runtime ? > > > > More thanks > > > > --- Nathan Maves <[EMAIL PROTECTED]> escribió: > > > >> Not really sure if you truly want to save the sql > or > >> just look at if > >> for debugging purposes. > >> > >> If you are just trying to debug the look at > setting > >> up logging for > >> your application. The following page on the wiki > >> should help you set > >> that up. > >> > >> > > > http://opensource2.atlassian.com/confluence/oss/display/IBATIS/How+do > >> > >> +I+get+SqlMapClient+to+log+SQL+statements > >> > >> Nathan > >> > >> On Mar 8, 2006, at 9:39 AM, Lurtz Ugluk wrote: > >> > >>> How Can I get the sql statement that de iBatis > >>> execute? > >>> I need the sql statement at runtime to create a > >>> String and save it. > >>> > >>> Thanks. > >>> > >>> > >>> > >>> ______________________________________________ > >>> LLama Gratis a cualquier PC del Mundo. > >>> Llamadas a fijos y móviles desde 1 céntimo por > >> minuto. > >>> http://es.voice.yahoo.com > >> > >> > > > > > > > > > > ______________________________________________ > > LLama Gratis a cualquier PC del Mundo. > > Llamadas a fijos y móviles desde 1 céntimo por > minuto. > > http://es.voice.yahoo.com > > ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
