error while uploading data to sql azure using BCP

SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Server Native Client 10.0]Unexpected EOF encountered in BCP data-file

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
-U [email protected]
-P [email protected]#123 -E -h 'TABLOCK' -n -k
If someone knows the correct solution of it please help me out I had already tried many solution but that didn't work for me.

Your help will be appreciated.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!