Received an invalid column length from the bcp client for colid 6

后端 未结 7 1971
别那么骄傲
别那么骄傲 2020-12-12 18:41

I want to bulk upload csv file data to sql server 2005 from c# code but I am encountering the below error -

Received an invalid column length from th

7条回答
  •  孤城傲影
    2020-12-12 19:12

    Check the size of the columns in the table you are doing bulk insert/copy. the varchar or other string columns might needs to be extended or the value your are inserting needs to be trim. Column order also should be same as in table.

    e.g, Increase size of varchar column 30 to 50 =>

    ALTER TABLE [dbo].[TableName] ALTER COLUMN [ColumnName] Varchar(50)

提交回复
热议问题