aspose file tools*
The moose likes JDBC and the fly likes Error :- String or binary data would be truncated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error :- String or binary data would be truncated" Watch "Error :- String or binary data would be truncated" New topic
Author

Error :- String or binary data would be truncated

rameshmca rk
Greenhorn

Joined: Jan 27, 2007
Posts: 17
Hi,
I tried to execute insert query using String and integer variables I got
"String or binary data would be truncated" error I tried for many times .But I did not get the insertion of data.Give me an complete requested insert statement example.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2503
    
    8

Originally posted by rameshmca rk:
Hi,
I tried to execute insert query using String and integer variables I got
"String or binary data would be truncated" error I tried for many times .But I did not get the insertion of data.Give me an complete requested insert statement example.


This means that you are inserting data that does not fit in your table's column.

If your column name can hold 10 characters, and you try to insert 'rameshmca rk', you can get this error.

If you show us your table definition and the query you use to insert the data, we can help you finding out the exact cause.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error :- String or binary data would be truncated