# Database Discussions > MS SQL Server 7/MS SQL Server 2000 >  [mssql] I/O error while reading BCP format file

## Daniel Bolger

Hi All,

I had a problem today where BCP would not read the format file I created giving the following error:

I/O error while reading BCP format file.

I searched the archives here at swynk.com and found a thread titled exactly the same as the one I am now creating. There were numerous responses to this thread but none of them seemed to solve the problem for me (short of the one that suggested using BCP to create the format file, which I didn&#39;t want to do).

I used BCP to create a format file for me (which looked identical to the format file that I created) and it worked fine. With my suspicions aroused, I used a binary file viewer to look at the contents of each file and highlight the differences. Apart from the usual variations in whitespace I noticed that the my file did not have any carriage returnline feed at the end of the last row definition.

My format file ended at the end of the last row definition line. It did not have any carriage returns and line feeds. I matched the one generated by BCP and added the following &#34;

&#34; to the end of the file, tested my format file and it worked perfectly.

The moral of the story is, make sure when you create a format file, you have an empty line at the end of the file (ie: after your last &#34;Server Column Name&#34;, make sure you have &#34;

&#34; sans quotes).

Hope this saves someone a few hours :-)

Cheers,
Dan.

----------


## hi_madan

dude... you are a lifesaver. 

long live Dan!

madan

----------


## _Rab_

Cheers fella, you've saved me an afternoon of Googling

----------

