SQLState = S1000,NativeError = 0错误= [Microsoft] [SQL Server Native Client 10.0] BCP数据文件中遇到意外的EOF [英] SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Server Native Client 10.0]Unexpected EOF encountered in BCP data-file
问题描述
将数据从csv文件导入SQL azure表时出现此错误。我是这项技术的新手。所以我正在尝试一些小记录。我的csv文件中的记录很少,我的Azure数据库表现在是空的。
这是SQL Azure中表格的结构:
创建表BCP
(
Id int identity(1,1)
Value int ,
名称nvarchar(50),
约束[pk_bcp] primMary key clustered([id] asc)
)在[主要]
记录我试图插入如下
100,abc
200,bcd
300,cdf
400,efg
500,fgh
600,ghi
700,hij
800,ijk
900,jkl
我试图通过命令提示符来实现。我正在使用的命令是
C:\ Users \Administrator> BCP TestTask.dbo.BCP在C:\ Users \Administrator \Desktop \\ \\示例\ BCP.csv
-S tcp:< servername> .database.windows.net
-U 12345admin @< servername> .database.windows。 net
-P Welc @ m#123 -E -h'TABLOCK'-n -k -t',' - r'\ n'
I am getting this error while importing data from a csv file to SQL azure table. I am new to this technology. So I am trying it out with some small no of records. I have very few records in my csv file and my Azure database table is empty right now.
This is the structure of the table in SQL Azure:
Create Table BCP
(
Id int identity(1,1)
Value int,
Name nvarchar(50),
Constraint [pk_bcp] primMary key clustered([id] asc)
) on [primary]
records I am trying to insert are as follows
100, abc
200, bcd
300, cdf
400, efg
500, fgh
600, ghi
700, hij
800, ijk
900, jkl
I am trying to achieve through command prompt. the command I am using is
C:\Users\Administrator>BCP TestTask.dbo.BCP In C:\Users\Administrator\Desktop\Example\BCP.csv
-S tcp:<servername>.database.windows.net
-U 12345admin@<servername>.database.windows.net
-P Welc@m#123 -E -h 'TABLOCK' -n -k -t ',' -r '\n'
这篇关于SQLState = S1000,NativeError = 0错误= [Microsoft] [SQL Server Native Client 10.0] BCP数据文件中遇到意外的EOF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!