System. Data. sqlclient. sqlexception: truncates string or binary data.

Source: Internet
Author: User

System. Data. sqlclient. sqlexception
The string or binary data is truncated.
The statement has been terminated.

 

This problem occurs because the field size of the temporary table that will be truncated during table creation. Then, when the row is inserted, it exceeds the size of this field. Dedicated,DbspsreportingThe following stored procedures in the database are caused by this problem:

  • Usp_insert_factfilestorageA Stored Procedure namedTbltempfilestorage_tofactstorageTemporary table. This tableFiletypeThe field is incorrectly defined as nvarchar (25 ). Instead,FiletypeThe field must be inDbspsreporting. DBO. tbldocsTableDoctypeField match.
  • Usp_insert_factwssA Stored Procedure namedTbltempwss_tofactloadTemporary table. The following fields are incorrectly defined in this table:
    • Wssdate
    • Wssuser
    • Wssdoc

    These fields must matchDbspsreportingstaging. DBO. tblwsslogdataCorresponding fields in the table.

Check the database and find that the field definition is too small. varchar (200) has been exceeded. Change to varchar (2000)

Error Correction!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.