Site icon Database Tutorials

Unexpected EOF encountered in BCP data-file

 

ERROR MESAGGE:

“[Microsoft][SQL Native Client ]Unexpected EOF encountered in BCP data-file”

EXPLANATION:

You may encounter an error message when trying to transfer data to your database with the BCP tool from a CSV format file.

SOLUTION:

The reason for the problem is that the delimiters used in your CSV file are different from the delimiter in your command.

For example, if the delimiter in your CSV file is a comma and you have not specified any delimiters in your BCP command, you will see this error.

Example of a command where a comma separator is not used:

As you can see, this command does not specify a comma as delimiter. The “-t” parameter must be used to specify the comma delimiter.

Exit mobile version