inserting special characters

2010-04-17 Thread vnug
Hi: We are using iBATIS2 and PostgreSQL8.3 with pgjdbc3 and Java1.5. We are trying insert a string with "single quote" and it is failing with SQLException. We were under the impression iBATIS uses PreparedStatement for the database connections and this should take care of escaping the "single qu

Re: inserting special characters

2010-04-17 Thread Andrius Juozapaitis
It's likely that you used the ${param} notation that includes the string in query instead of #{param}, which binds a prepared statement parameter. regards, Andrius On Sat, Apr 17, 2010 at 10:08 AM, vnug wrote: > > Hi: > > We are using iBATIS2 and PostgreSQL8.3 with pgjdbc3 and Java1.5. > > We a

Re: inserting special characters

2010-04-17 Thread Larry Meadors
...or since you're using ibatis2, #param# instead of $param$. :) On Sat, Apr 17, 2010 at 2:55 AM, Andrius Juozapaitis wrote: > It's likely that you used the ${param} notation that includes the string in > query instead of #{param}, which binds a prepared statement parameter. > regards, > Andrius