Re: Importing Problems with XML and XSD into SQL 2000

From: Graeme Malcolm \(Content Master Ltd.\) (graemem_cm_at_hotmail.com)
Date: 03/25/04


Date: Thu, 25 Mar 2004 11:02:42 -0000

Can you post a sample of the XML you're trying to import as well as the
table defs you're importing into?

-- 
Graeme Malcolm
Principal Technologist
Content Master Ltd.
"Mardi Morillo" <mmorillo@mbcsystems.org> wrote in message
news:4B3F602E-394B-46F7-B711-FDDC69558389@microsoft.com...
> Im new to everything :) I'm tring to import an XML file using the bulkload
method in an vb script within a DTS package. It initally gave me errors of
"relationship expected on 'EventList'" but after some research I specified a
relationship within my xsd file for events with an annotation. However, it
still gives me "the parent/child table of the relationship on 'EventList'
does not match." I think the reason is the parent child relationship is not
necessarly linked by any subelement key. Rather the one of the two "main"
elements in this group "Event" appears in as a "sub"element or referenced
element for the other "main"element "EventList." What code can i use to
establish the SQL:relationship in a way that correctly describes the
elements' relationship? Here's part of the xsd, a little long I apologize:
>
> <xs:annotation><xs:appinfo><sql:relationship name="Events" parent="Event"
parent-key="Event" child="EventList"
child-key="Event"/></xs:appinfo></xs:annotation><xs:element name="Event"
sql:relation="Event"
sql:relationship="Events"><xs:complexType><xs:sequence><xs:element
ref="Action"/><xs:element ref="Date"/><xs:element ref="Time"/><xs:element
ref="SeqNo"/><xs:element ref="ConnID"/><xs:element ref="User"/><xs:element
ref="Code"/><xs:choice><xs:element ref="UserInfo"/><xs:element
ref="EntryInfo"/></xs:choice></xs:sequence><xs:attribute name="ver"
type="xs:string"/></xs:complexType></xs:element><xs:element name="EventList"
sql:relation="EventList"
sql:relationship="Events"><xs:complexType><xs:sequence><xs:element
ref="Event" minOccurs="0"
maxOccurs="unbounded"/></xs:sequence></xs:complexType></xs:element>
>
> thanks kind souls
>


Relevant Pages

  • Use of classes and datasets generated with xsd.exe
    ... Given a xml file with the following structure: ... i've generated a xsd file and using this new xsd file i've generated a ... and read the xml file using a Xmlserializer together with a filestream. ... relate it to the "letters" object and finally ...
    (microsoft.public.dotnet.xml)
  • Reference ID problem for import to SQL
    ... all data are insert into tables, but I want a reference element (foreign key ... I have a regular XML file and a mapping XSD file. ...
    (microsoft.public.sqlserver.xml)
  • Re: Question about difference between text file and database
    ... I haven't encountered XML before (short of knowing XML has something to ... A XML schema (XSD file, or DTD file (but that's older and I wouldn't recommend it)) are used to describe the structure of an XML file. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: xml in plain text file on heavy load.
    ... even if the XML file is magically and perfectly ... I want to emphasize that IIS would never be caching that XML file on its own ... Application is NOT synchronizing access to your ASP pages. ...
    (microsoft.public.inetserver.iis)
  • Re: TAPI 3.0 call attached data
    ... The format of the Call Attached Data is XML. ... XML file with CallAttchedData represents one or multiple data lists ... Root element is CallAttachedData. ... version CDATA #FIXED "1.0" ...
    (microsoft.public.win32.programmer.tapi)

Loading