When programming, I want to insert a row of records into a database table, which has many fields. The following error occurs on the browser:
Microsoft ole db provider for ODBC drivers error "80040e57"
[Microsoft] [odbc SQL Server Driver] {SQL Server] string or binary data wocould be truncated.
Thank you for your advice!
Bytes -----------------------------------------------------------------------------------------------------
So there is no problem. Is there a wrong type of data you entered? Top
Forgettor () on the second floor () The score is 0 at 11:49:00.
Is the content to be written to a field too long, for example, more than 255 bytes? Top
MOG on the third floor (dark world of warcraft) The score is 0 at 15:27:00.
When processing large fields such as text or image in SQL Server, you cannot use SQL statements. Instead, use AppendChunk and getchunk for write/read operations. Method You can check msdn. For example, you can see. Top.
Layer 4 sdy_jin () The score is 0 at 15:21:00.
The length of the written data is incorrect! Top
Huitor () on the fifth floor () The score is 0 at 14:41:00.
The error occurs because the length of the string is greater than the length of the field.
For example, the field1 field type is varchar (2), and the SQL statement is:
Update tablename set field1 = 'hello' top
Ghj1976 (Jun. Net) on the 6th floor) The score is 0 at 15:11:00.
String or binary data wocould be truncated. It is because the length of the character you entered exceeds the database Length
Set the character length of the field. Top
Microsoft ole db provider for ODBC drivers error '80040e57 'because the number of fields in the database table is too small. For example, if the length of Field 1 is 10 characters and you insert a value greater than 10, this error will occur. Check it!