...or since you're using ibatis2, #param# instead of $param$. :)

On Sat, Apr 17, 2010 at 2:55 AM, Andrius Juozapaitis <andri...@gmail.com> 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
>
> On Sat, Apr 17, 2010 at 10:08 AM, vnug <v...@cox.net> wrote:
>>
>> 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
>> quote". Is there anything we are missing?
>>
>> I am attaching the error messages for reference:
>> ================
>> [Sat Apr 17 09:56:13 IST 2010] Exception in product logicCreate failed;
>> nested exception is:
>>        com.ibatis.common.jdbc.exception.NestedSQLException:
>> --- The error occurred in xmlfolder/insert.xml.
>> --- The error occurred while applying a parameter map.
>> --- Check the insertproductspecificationtemp-InlineParameterMap.
>> --- Check the statement (update failed).
>> --- Cause: java.sql.SQLException: ERROR:  syntax error at or near "round"
>> at
>> character 176
>>
>> syntax error at or near "round" at character 176
>> STATEMENT:          insert into product_specification_temp
>> (product_specification_id,serial_no,test,specification,stp_id) values
>> ('IDS007-01','4','tst descrption','peach colored 'round' shaped film
>> coated
>> tablets','IDT007-01')
>> ===============
>>
>> I would appreciate any pointers to resolve this issue. Thank you.
>> --
>> View this message in context:
>> http://old.nabble.com/inserting-special-characters-tp28274483p28274483.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to