从 bcp 客户端收到一个无效的列长度,用于 colid 6 [英] Received an invalid column length from the bcp client for colid 6

查看:47
本文介绍了从 bcp 客户端收到一个无效的列长度,用于 colid 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 csv 文件数据从 c# 代码批量上传到 sql server 2005,但遇到以下错误 -

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

从 bcp 客户端收到一个无效的列长度,用于 colid 6.

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

当批量复制写入数据库服务器时

when bulk copy write to database server

推荐答案

excel 中的数据列之一(Column Id 6)有一个或多个单元格数据超过了数据库中的数据列数据类型长度.

One of the data columns in the excel (Column Id 6) has one or more cell data that exceed the datacolumn datatype length in the database.

验证excel中的数据.还要验证excel中的数据格式是否符合数据库表模式.

Verify the data in excel. Also verify the data in the excel for its format to be in compliance with the database table schema.

为避免这种情况,请尝试超过数据库表中字符串数据类型的数据长度.

To avoid this, try exceeding the data-length of the string datatype in the database table.

希望这会有所帮助.

这篇关于从 bcp 客户端收到一个无效的列长度,用于 colid 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆