Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Weired SQL BCP Error

Author  Topic 

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-06-30 : 00:05:42
I am using the Bcp for loading the Tab delimited text file into the Temporay Table.I am using the following command.
[master].[dbo].[XP_CMDSHELL]'BCP.exe ##Temp in "F:\temp.txt" -w -T -S Servername'
If I save the file as ANSI I get the Following Error.
NULL
Starting copy...
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unexpected EOF encountered in BCP data-file
NULL
0 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 1
NULL

If I save the file as UNICODE it works good.
I am using the -w argument for UNICODE.I expect -w should work fine with ANSI too.
Any Idea why this is happening?
Thanks in advance.

Thanks!
Raju

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2006-06-30 : 14:57:21
quote:

I am using the -w argument for UNICODE.I expect -w should work fine with ANSI too.



Why should it? You've told bcp to expect wide characters, but not supplied them.

Ken
Go to Top of Page

vgr.raju
Yak Posting Veteran

95 Posts

Posted - 2006-06-30 : 23:32:19
Thanks Ken.
I was thinking -w argument should be compatible with UNICODE and ANSI.It seems that is not the case.
Go to Top of Page
   

- Advertisement -