Click here to Skip to main content
15,916,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
folowing error display when i run my insert page

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

Somewhere, you are trying to insert data to a field that is not big enough to hold it.

For example, you may be trying to insert 20 characters to a field you defined as 10 long.

Add logging to your insert, so that before you do the actual insert, you log what you are trying to insert, and then a success marker afterwards. That should hopefully tell you where your error is.
 
Share this answer
 
You are overriding your defined column size in database
like in varchar(20) you are inserting more than 20 characters :-\
 
Share this answer
 
It happens when try to insert the sql table column with data having length more than the column length which you have speciifed.

The same problem which you are facing is refeered
here[^]. Hope this might help you to sort out your issue.
 
Share this answer
 

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