Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I/O error while reading BCP format file

Today I created a new staging table and a BCP .fmt file. I created some test data and attempted to run the BCP utility from the command line:

BCP Error

I've got about 20 different format files and staging tables from previous work and this is the first time I have encountered this error.

How can I fix this error?

Please note, I have added my solution below, but if you have other answers, please add them in. The answer was so quirky/obscure that I think it may help others.

like image 630
Jon Raynor Avatar asked Mar 30 '12 17:03

Jon Raynor


1 Answers

Basically, this one was really strange. In order for it to work, make sure there is an empty line after the last column defined in the format file. I added an extra empty line, resaved the file, and then the BCP utility ran the file successfully. I've indicated the extra line with a red rectangle.

BCP Fix

like image 101
Jon Raynor Avatar answered Feb 27 '23 19:02

Jon Raynor