Hi Daniel!
Tell us how txt file was created and how do you insert? Tell us the command line you are using.
The error may be due to incorrect file path too. Or there may be case of improper row and column terminator which you provide with -r and -t switches.
For example -
------------------------------------------------------
bcp "db..employee" out "d:\txt.txt" -c -t"\t" -r"\n" -U"user_name" -P"password" -q
------------------------------------------------------
In this example, if you have Column terminator Tab as -t"\t" and Row terminator as "\n", then you have to 'BCP in' in the same manner. Something like this -
------------------------------------------------------
bcp "db..employee" in "d:\txt.txt" -c -t"\t" -r"\n" -U"user_name" -P"password" -q
------------------------------------------------------
So, open the file, take a look on format and also path of the file. I hope you must have got the point. If you still have same problem, try to configure ODBC also.
Reply if it works or not..
- Som Dutt
|