If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Hi!
I am having a small problem with bcp in a text file.
I am parsing an excel file using perl modules, storing the dta in a text file and tht data needs to be bcp in into a table in a database. now i have done bcp before but earlier i was doing bcp out and then bcp in the result file of bcp in so no interaction with the text file was needed.
Now since the text file has been created external to the bcp operation it is giving me the following error and I ant figure it out
Starting copy...
Unexpected EOF encountered in BCP data-file
bcp copy in failed
Can't spawn "bcp dbo.tablename in file.txt -S abc -U sa -P xxx -c": No error at perlscript.pl line 104.
If anyone can help me as to what the problem may be it'll be great!
I was wondering if the problem is because you can only bcp in a file tht is theresult of a bcp out? Or maybe becoz any bcp in file has some special characteristic that specifies and EOF or something?
Please help asap..thnx in advance
cheers
-s
__________________
You try and try again..but then give up, there's no sense in being a complete fool about it!!!
Did you try using the -e errorfile option on your BCP command? Try to replicate the error on the command line using that option and see if the offending line shows up in the errorfile.
Thanx for your help john..really appreciate it..
The problem was with my row/column terminators..managed to solve it
Alls working smoothly now!
cheers
-s
__________________
You try and try again..but then give up, there's no sense in being a complete fool about it!!!