dbTalk Databases Forums  

SQLXML 3.0 Bulk Load

microsoft.public.sqlserver.xml microsoft.public.sqlserver.xml


Discuss SQLXML 3.0 Bulk Load in the microsoft.public.sqlserver.xml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
forest95@hotmail.com
 
Posts: n/a

Default SQLXML 3.0 Bulk Load - 05-02-2005 , 04:28 PM






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 With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.