SQLXML 3.0 Bulk Load - XML SOAP

This is a discussion on SQLXML 3.0 Bulk Load - XML SOAP ; I am attempting to import an XML file into SQL Server 2000 using the SQLXML Bulk Load functionality. I have written a DTS Package which takes an .XML file and .XSD file which I have annotated. I have one database ...

+ Reply to Thread
Results 1 to 2 of 2

SQLXML 3.0 Bulk Load

  1. Default SQLXML 3.0 Bulk Load

    I am attempting to import an XML file into SQL Server 2000 using the
    SQLXML Bulk Load functionality. I have written a DTS Package which
    takes an .XML file and .XSD file which I have annotated. I have one
    database table I'm using to import the data but I get the following
    error:

    Schema: relationship expected on 'Task'


    Here is a snippet of the .XSD:


    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
    <!--
    ******************************************************************************
    -->
    <!-- Parent Tree -->
    <xsd:element name="TaskData" type="TaskDataType"
    sql:relation="tbl_XML_Data"/>
    <!--
    ******************************************************************************
    -->
    <!-- Define Data Type TaskDataType -->
    <xsd:complexType name="TaskDataType">
    <xsd:sequence>
    <xsd:element name="Task" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:complexContent>
    <xsd:extension base="TaskType"/>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <!--
    ******************************************************************************
    -->
    <!-- Define Data Type TaskType -->
    <xsd:complexType name="TaskType">
    <xsd:sequence>
    <xsd:element name="RecordNumber" type="xsdositiveInteger"
    sql:field="RecordNumber"/>
    <xsd:element name="ContractNumber" sql:field="ContractNumber">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="6"/>
    <xsd:maxLength value="13"/>
    <xsdattern value="[^'&quot;]*"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>


  2. Default Re: SQLXML 3.0 Bulk Load

    You need to specify relationships if a child element maps to different than
    table. Check out this link for full list of annotations and their usage:

    http://msdn.microsoft.com/library/de...nch_SQLXML.asp


    --
    Bertan ARI
    This posting is provided "AS IS" with no warranties, and confers no rights.


    <forest95@hotmail.com> wrote in message
    news:1115069201.845833.265830@f14g2000cwb.googlegroups.com...
    > I am attempting to import an XML file into SQL Server 2000 using the
    > SQLXML Bulk Load functionality. I have written a DTS Package which
    > takes an .XML file and .XSD file which I have annotated. I have one
    > database table I'm using to import the data but I get the following
    > error:
    >
    > Schema: relationship expected on 'Task'
    >
    >
    > Here is a snippet of the .XSD:
    >
    >
    > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    > xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
    > <!--
    >

    ****************************************************************************
    **
    > -->
    > <!-- Parent Tree -->
    > <xsd:element name="TaskData" type="TaskDataType"
    > sql:relation="tbl_XML_Data"/>
    > <!--
    >

    ****************************************************************************
    **
    > -->
    > <!-- Define Data Type TaskDataType -->
    > <xsd:complexType name="TaskDataType">
    > <xsd:sequence>
    > <xsd:element name="Task" maxOccurs="unbounded">
    > <xsd:complexType>
    > <xsd:complexContent>
    > <xsd:extension base="TaskType"/>
    > </xsd:complexContent>
    > </xsd:complexType>
    > </xsd:element>
    > </xsd:sequence>
    > </xsd:complexType>
    > <!--
    >

    ****************************************************************************
    **
    > -->
    > <!-- Define Data Type TaskType -->
    > <xsd:complexType name="TaskType">
    > <xsd:sequence>
    > <xsd:element name="RecordNumber" type="xsdositiveInteger"
    > sql:field="RecordNumber"/>
    > <xsd:element name="ContractNumber" sql:field="ContractNumber">
    > <xsd:simpleType>
    > <xsd:restriction base="xsd:string">
    > <xsd:minLength value="6"/>
    > <xsd:maxLength value="13"/>
    > <xsdattern value="[^'&quot;]*"/>
    > </xsd:restriction>
    > </xsd:simpleType>
    > </xsd:element>
    >




+ Reply to Thread

Similar Threads

  1. SQLXML Bulk Load - Server cannot load DCOM
    By Application Development in forum XML SOAP
    Replies: 5
    Last Post: 03-31-2006, 01:23 PM
  2. SQLXML bulk load
    By Application Development in forum XML SOAP
    Replies: 0
    Last Post: 12-08-2005, 06:47 PM
  3. SQLXML Bulk Load
    By Application Development in forum XML SOAP
    Replies: 1
    Last Post: 06-13-2005, 11:06 AM
  4. SQLXML 3.0 Bulk Load
    By Application Development in forum XML SOAP
    Replies: 0
    Last Post: 05-02-2005, 04:28 PM
  5. SQLXML 3.0 Bulk Load
    By Application Development in forum XML SOAP
    Replies: 0
    Last Post: 05-02-2005, 04:27 PM