0 Replies Latest reply on Dec 21, 2008 12:05 PM by mr. modus

    SQL2K, XML Bulk Insert woes. Please Help

    mr. modus Level 1
      I have Win2k3 server with latest sp's. I have mssql 2k enterprise with SP4. I have installed sqlxml3.0 sp 3. I've tried the examples in the documentation but cannot get this to work. I really need to be able to do a bulk insert using the xml file below through a coldfusion query. I saw an example online how to do it with CF and followed the example to the letter and get this error:

      Could not bulk insert. Unknown version of format file 'D:\Websites\globalFunctions]getEventPerformersMapping.xml'.

      My XML file ("getEventPerformers.txt") looks like this:
      <PerformerName>Lion King</PerformerName>
      <PerformerName>Lion King</PerformerName>

      The format file I'm using (that I got from the online example) is:

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

      <ElementType name="EventID" dt:type="i8" />
      <ElementType name="PerformerID" dt:type="int" />
      <ElementType name="PerformerName" dt:type="string" />

      <ElementType name="ROOT" sql:is-constant="1">
      <element type="EventPerformer" />

      <ElementType name="EventPerformer" sql:relation="tbl_EventPerformers">
      <element type="EventID" sql:field="EventID" />
      <element type="PerformerID" sql:field="PerformerID" />
      <element type="PerformerName" sql:field="PerformerName" />

      My db table structure is this:

      EventID - bigint - Primary Key
      PerformerID - int
      PerformerName varchar(100)

      In the msdn docs there is an example that uses VB script create a SQLXMLBulkLoad.SQLXMLBulkload.3.0 object, but I couldn't get that to work either.

      Someone please help!