Inserting special characters to database.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mary_brahma
Posted On:   Monday, March 26, 2007 05:00 AM

Hi,I want to insert strings containing special characters like ',"",(),etc to database. I am using MSSQL database. When I tried to insert the string - IC directs disclosure of file relating to Justice Mohan's app'ntmnt to database, the following error occurs-- [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 's'. Can anyone give me the solution?

Re: Inserting special characters to database.

Posted By:   WarnerJan_Veldhuis  
Posted On:   Monday, March 26, 2007 06:37 AM

Either use a PreparedStatement which takes care of all this, or escape the ' with ''
About | Sitemap | Contact