File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Problem while inserting data into MS SQL Server 2005. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem while inserting data into MS SQL Server 2005." Watch "Problem while inserting data into MS SQL Server 2005." New topic
Author

Problem while inserting data into MS SQL Server 2005.

Kannan Raman
Greenhorn

Joined: Nov 14, 2008
Posts: 7
Hi All,
Kannan Raman
Greenhorn

Joined: Nov 14, 2008
Posts: 7
Sorry all,
Before mentioning the problem,the connection was lost.I am extremely sorry for that.

I have developed a portal for a Quiz application.I am using JSP as front end and MS SQL Server as backend.

I am encrypting both the question and correct answer.While I am trying to store these details into the database I am getting a SQL exception.

[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near '_vm'.

I fixed the issue.The reason for the problem is,While encrypting the text it will insert the ' & " .While trying to insert that into DB,the SQL server is trigerring this exception.

The data type of the field in the database is varchar2(1000).

Please help me to resolve this.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Can we see your code?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while inserting data into MS SQL Server 2005.