SQLXML 4 + Transaction + TempFilePath + File does not exist

Unanswered SQLXML 4 + Transaction + TempFilePath + File does not exist

  • Tuesday, May 01, 2012 11:14 AM
     
      Has Code

    Dear All,

    I'm trying to use SQLXML4 in my ASP.Net 4 website to bulk load multiple records into many tables. For this reason I've set the Transaction to true and TempFilePath to a folder that exists on the SQL Server box and to which the account the SQL Server is running as has read and write access to. In fact I've even set "Everyone" read/write access to that folder. Unfortunately I still get this error:

    [COMException (0x80040e14): Cannot bulk load. The file "C:\SQLBulk\BL_201251104949439_17.txt" does not exist.]
       SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class.Execute(String bstrSchemaFile, Object vDataFile) +0
       SQLXmlTest.ExecuteBulkLoad(String connString, String schemaFile, String xmlFile, String errorFile, String tempPath)

    In ProcessMonitor I can see that it's trying to "CreateFile" but it throws a "Name Not Found":

    Date & Time:	5/1/2012 11:49:49 AM
    Event Class:	File System
    Operation:	CreateFile
    Result:	NAME NOT FOUND
    Path:	C:\SQLBulk\BL_201251104949439_17.txt
    TID:	6180
    Duration:	0.0000240
    Desired Access:	Generic Read
    Disposition:	Open
    Options:	No Buffering, Non-Directory File, Open No Recall
    Attributes:	n/a
    ShareMode:	Read
    AllocationSize:	n/a
    
    
    
    Description:	SQL Server Windows NT
    Company:	Microsoft Corporation
    Name:	sqlservr.exe
    Version:	2007.100.5500.0
    Path:	C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\Binn\sqlservr.exe
    Command Line:	"C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\Binn\sqlservr.exe" -sSQL2008
    PID:	7448
    Parent PID:	444
    Session ID:	0
    User:	DOMAIN\SQLAgentAcc
    Auth ID:	00000000:83095973
    Architecture:	32-bit
    Virtualized:	n/a
    Integrity:	n/a
    Started:	4/18/2012 9:03:55 AM
    Ended:	(Running)
    

    I don't know what else I can do/try to fix this problem. Has anyone encountered this issue - or can suggest how to fix it?

    Kind regards

    Sidharth

All Replies

  • Tuesday, May 01, 2012 7:41 PM
    Answerer
     
     

    Is it possible it's looking for this file on the box the .net process is running on?

    Have you tried not setting this to see what happens?

  • Monday, May 14, 2012 1:19 PM
     
     

    hi you can also post your query on this forum.

    http://www.sqlservercentral.com/Forums/Topic205335-21-1.aspx#bm206024