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.

 
Go Back  dBforums > Database Server Software > Sybase > BCP in failed! urgent help needed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-03, 22:42
shuchi shuchi is offline
Registered User
 
Join Date: Jan 2003
Posts: 55
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!!!
Reply With Quote
  #2 (permalink)  
Old 02-27-03, 10:21
jgwilding jgwilding is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 02-28-03, 02:20
shuchi shuchi is offline
Registered User
 
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!!!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On