CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
- Article ID:
98 - Date Created
Friday, February 4, 2011 - Last Updated
Saturday, June 25, 2011 - This Article Has been Viewed
21292 times - Short Desc
If you are inserting data that is larger than the set LENGTH of your data LENGTH. You will receive the following error, The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. - Details
If you are trying to INSERT or UPDATE your data Column with data that is longer than your Database COLUMN LENGTH (or) Your Parameterized Query length.
Both Scenario's can be easily fixed.
There are 2 Different errors you can get.
Access Database Error is:Microsoft Access Database Engine error '80040e57'
The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
/encrypt.asp, line 28
SQL Server will give the following errorMicrosoft OLE DB Provider for SQL Server error '80040e57'
String or binary data would be truncated.
/encrypt.asp, line 28 - Recreate Issue
This issue will happen if you are trying to INSERT or UPDATE your database Column with a LENGTH that is longer than the set LENGTH either within
Scenario #1:
If the length in your Database LENGTH is not set high enough
Scenario #2:
If the length in your Paramertized Query is not set high enough to allow for the given data to be passed through. - Resolve Issue
To resolve this issue.
Scenario #1:
Make sure that your Database Column's LENGTH is set to a large enough number that will allow for the data to be inserted.
Scenario #2:
If you are using Parameterized Queries in your ASP Code, make sure that the database LENGTH column is at a high enough value.
Example:
If you have your Database Column LENGTH set to 25 and you are using MD5, then you are going to have to allow for the length change,
So: 25 Character LENGTH
Would become [50]
insIm.Parameters.Append insIm.CreateParameter("@myPW", adVarChar, adParamInput, 50, getMyPW)
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24689
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21292
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19538
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17780
- The backup set holds a backup of a database other than the existing 16819