Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    55

    Unanswered: BCP in failed! urgent help needed

    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!!!

  2. #2
    Join Date
    Feb 2003
    Posts
    6
    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.

    john

  3. #3
    Join Date
    Jan 2003
    Posts
    55

    thnx

    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!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •