Unable to open BCP host data-file

  • I have multiple ascii files that need to be uploaded to my server/database/table.

    I have created the format file of the data to be imported.

    The command I am using is:

    bcp database..WKCE in -fc:\wkce.fmt -ic:\cg10grt.txt -SServer -Uuser -Ppassword -ec:\wkce.err

    What is returned is:

    SQLState = S1000, NativeError = 0

    Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file

    Not able to locate what this error message means. Any help would be appreciated.

  • Where does the data file reside, Where do you run the BCP command, in your workstation or server?

  • I ran it on my workstation as well as the server with SQL Server on it.

    It didn't seem to matter - because I received the same error message.

  • I would copy the data file into c: drive of server and run the BCP from the server. Pelase make sure the data file is able to be opened by text editor program such as notepad.exe or textpad.

  • I logged on to the server. The text file was openned using notepad. No access issues.

    Next I ran from cmd line:

    bcp database..WKCE in -fc:\wkce.fmt -ic:\cg10grt.txt -SServer -Uuser -Ppassword -ec:\wkce.err

    Error returned was:

    SQLState = S1000, NativeError = 0

    Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file

    Any other suggestions?

  • Can you try to import it using DTS?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply