Please Help me in PreparedStatement
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, April 19, 2001 06:12 AM

When I am trying to insert a record through PreparedStatement, I am getting this error. My Backend is SQLServer.
The datatype the field is varchar ( 8000 ). My String Length is ( 3056 ). I am using JdbcOdbcDriver.

The SQLState is : 22001


Please give a solution for this problem.


SQLException:

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]String data, right truncation

Re: Please Help me in PreparedStatement

Posted By:   Don_Taylor  
Posted On:   Thursday, April 19, 2001 06:38 AM

The Sun's Jdbc-Odbc is not very good. I was having the exact same problems you're having. Go to http://www.j-netdirect.com and get one of their drivers, I used JDataConnect. Same code, different driver, everything is working fine!
About | Sitemap | Contact