PRB: SQLXMLBulkLoad Error Message 80040E14: "File Could Not Be Opened" or "File Does Not Exist" (316371)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q316371

SYMPTOMS

When you run an XML Bulk Load application, one, or both, of the following error messages may occur:
Code: 80040E14 - Could not bulk insert because file '%s.txt' could not be opened. Operating system error code 3 (The system cannot find the path specified.)
Source: Microsoft OLE DB Provider for SQL Server
Code: 80040E14 - Could not bulk insert. File '%s.txt' does not exist.
Source: Microsoft OLE DB Provider for SQL Server

CAUSE

This problem occurs if:
  • SQL Server cannot locate the temporary file path specified by the SQLXMLBulkLoad object

    -or-

  • SQL Server can locate the temporary file path specified by the SQLXMLBulkLoad object but the target instance does not have enough permissions to read the files.

WORKAROUND

The temporary file path specified by the SQLXMLBulkLoad object must be a shared location accessible to the service account of the target instance of Microsoft SQL Server and to the account of the XML Bulk Load application.

To work around this problem, you can use any one of the following three methods:
  • Set the SQLXMLBulkLoad object Transaction property to FALSE. For example:
    objBL.transaction = "FALSE"
    This setting causes the operation to run in a non-transacted mode. SQL Server does not need to read the temporary files in a non-transacted mode.

    NOTE: This workaround may impact the performance of the XML Bulk Load operation.
  • Limit the XML Bulk Load application to run only on the SQL Server computer.
  • Provide the Tempfilepath property of the SQLXMLBulkLoad object with the shared folder accessible by both the SQL Server computer and the computer on which the XML Bulk Load application resides.

    NOTE: If the account for the XML Bulk Load application cannot access the shared folder, Error 80046000 occur. For more information about Error 80046000, refer to the following article in the Microsoft Knowledge Base:

    316361 PRB: SQLXMLBulkLoad Error Message 80046000: "The System Cannot Find The Path Specified"

MORE INFORMATION

The first error message (shown in the "Symptoms" section) occurs if the service account of the target instance of Microsoft SQL Server cannot locate the specified path.

The second error message (shown in the "Symptoms" section) occurs if the service account of the target instance of Microsoft SQL Server can locate the path but cannot find the files or does not have enough permissions to read the files.

The second error message may also occur if the path already exists locally on the SQL Server computer, but the path in which the XML Bulk Load application creates the temporary files is on a different computer than the local SQL Server.

REFERENCES

SQL XML Books Online; topic: "Performing Bulk Load of XML Data"

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbprb KB316371