Results 1 to 1 of 1

Thread: Using sqlxmlbulk load and check for existing records

  1. #1
    Join Date
    Feb 2008

    Using sqlxmlbulk load and check for existing records


    I'm using sqlxml bulk load 3.0 to import some xml. I'm just wondering if there is a way (either in the mappng schema, or the script itself) to check if the record already exists? or if theres any other suggestions on how i could update my table from the xml.


    Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
    objBL.ConnectionString = "provider=SQLOLEDB.1;data source=ip;database=products;uid=sa;pwd=test"
    objBL.ErrorLogFile = "c:\xml\error.log"
    objBL.Execute "c:\xml\productmapping.xml", "c:\xml\products.xml"

    MsgBox "XML imported to sql server!", "0", "XML imported to sql server"

    Set objBL = Nothing


    <?xml version="1.0" ?>
    <Schema xmlns="urn:schemas-microsoft-com:xml-data"
    xmlns:sql="urn:schemas-microsoft-com:xml-sql" >

    <ElementType name="ID" dt:type="int" />
    <ElementType name="event_token" dt:type="char" />
    <ElementType name="event_desc" dt:type="nvarchar" />

    <ElementType name="event_list" sql:is-constant="1">
    <element type="event" />

    <ElementType name="event" sql:relation="products">
    <element type="event_token" sql:field="event_token" />
    <element type="event_desc" sql:field="event_desc" />


    Last edited by emmetmurray; 06-24-2008 at 08:03 AM. Reason: title change

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles