ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vnug <v...@cox.net>
Subject inserting special characters
Date Sat, 17 Apr 2010 07:08:13 GMT

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-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message