using bcp

来源:互联网 发布:qq申诉软件下载 编辑:程序博客网 时间:2024/05/21 21:34

When i was using sql bcp tool to import a file to a table, i got the "unable to open bcp host data-file" error.

 

My command line is simple:

bcp mydb..mytable in "c:/......../file.txt" -T -c

 

It's strange, as i am in the local administrators group, and a sql sysadmin role member. I removed the parameter -T and -c for a try, but failed. They should be important and can't be removed.

 

Then I moved the source file to under c:/ drive, it works. i checked the path again, and found i typed a invalid path for the source file. after modifying that, everything works fine.

原创粉丝点击