SQL XML Bulk Load working without visible Error/Exception but no data is inserted!?

Hi,

I have a C# application that successfully creates an instance of SQLXMLBulkLoad3Class and executes with error. I can also see in the SQL Server trace that there is activity, (i.e. A bunch of insert statements for the tables that I would expect given the XML and XSD files). Problem is no data is written to the tables... There are no errors or exceptions reported either so I don't know where to start.

I can provide any details necessary but maybe there's a simple answer I am new to the Bulk Load process but this is code that I haven't written and it's worked before I just can't get it to work on my setup.

Can anybody help

Reagrds,

Chris.


Answer this question

SQL XML Bulk Load working without visible Error/Exception but no data is inserted!?

  • CHWu

    Hi Chris, please make sure that the target namespace of your schema matches the namespace you are using in the xml data. What you describe typically happens when bulkload cannot match any data with schema elements. Bulkload will ignore elements in the data it cannot match with the schema, so if there is a typo in either namespaces or element names it will not be able to match anything.

    Hope this helps,
    Bruno Denuit
    SQL Server Languages


  • Sohail Ch.

    Hi Tom,

    Sometimes, the bulkload object may not return an error as such, but write some information to the error log file (you can specify the error log file path using the ErrorLogFile property).

    If the bulkload doesn't return any error, could you please give me the options you are running with

    Thanks, Bruno.


  • Jim Stanley

    Hi Bruno

     

    I have a similar problem in that when I run my app on my localhost the bulk insert runs fine and rows are inserted.

    However, when I deploy my app to another server it runs without error, but no records are inserted.

    Help !!

    Thanks

    Tom


  • SQL XML Bulk Load working without visible Error/Exception but no data is inserted!?