Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can anybody solve this?

String or binary data would be truncated.
The statement has been terminated.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.

Source Error:
Line 117: doc1.document_location = path;
Line 118: db1.documents.InsertOnSubmit(doc1);
Line 119: db1.SubmitChanges();
Line 120: //int maxdocumentid = (from docu in db1.documents
Line 121: // select docu.document_id ).Max();
Posted
Updated 9-Dec-10 21:24pm
v3
Comments
Dalek Dave 10-Dec-10 3:24am    
Minor Edit for Grammar.

Hi,
:) Seems to be SQLException while truncating the data. You are trying to parse any data.
 
Share this answer
 
I believe you are pushing data in some Tables SQL Server, and the data is quite big for a tables column which have a predefined length of data...please check the table schema and push the data from your application as per.
 
Share this answer
 
Comments
Dalek Dave 10-Dec-10 3:24am    
Good Call.
senguptaamlan 10-Dec-10 3:53am    
Thanks @Dalek, actually I faced the same problem someday back...when I was working with a DB created by another guy nd unaware of the table schema.... :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900