Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Friday, February 24, 2012

c# Stored Procedure / OpenXML Failure - Can Anyone Help..??

Hi,

I have some c# code which calls a SP which is erroring Basically I pass in a XML string which can be upto 5 MB is size (not sure about overflow issues here), which then calls a SP which inserts the data into a SQL table.

The c# code is as follows:

---C#-------

SqlConnection conn =new SqlConnection(DBConn);

using(StreamReader sr =new StreamReader(xmlLocationString))

{

try

{

string @.xmlInput = sr.ReadToEnd();

SqlCommand cmd =new SqlCommand();

cmd.Connection=conn;

cmd.CommandText = "[AddArgentinaTrades]";

cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@.xmlInput", SqlDbType.Text,5120000));

cmd.Parameters["@.xmlInput"].Direction = ParameterDirection.Output;

conn.Open();

cmd.ExecuteNonQuery();

}

catch(SqlException SqlExp)

{

Console.WriteLine(SqlExp.Message);

}

finally

{

conn.Close();

sr.Close();

}

}

------Stored Proc--------

IF EXISTS (SELECT name FROM sysobjects WHERE name = 'AddArgentinaTrades' AND Type ='P')
DROP PROCEDURE AddArgentinaTrades
GO

CREATE PROCEDURE AddArgentinaTrades
@.xmlInput as text
AS

Declare @.idoc int

EXEC master.dbo.sp_xml_preparedocument @.idoc OUTPUT, @.xmlInput

INSERT INTO MarketRiskdev.dbo.Import_Argentina
SELECT un_cid, tnum, snum, cid, entityid, ctype, why, comp, oc, bs, ae, cp, trd_date, set_date, mat_date, val_date,
trader, famt, price, coupon, next_coupon, last_coupon, cpnfreq, cpnrate, cpntype, daycounttype, exch_notion,
contract_spot, base_cur, year_basis, buy_currency, buy_amount, sell_currency, sell_amount, [timestamp] FROM OPENXML(@.idoc, 'ArgentinaInputFile/Data',2)
WITH (un_cid varchar(50), tnum nvarchar(50), snum nvarchar(50), cid varchar(50), entityid varchar(50), ctype varchar(50),
why varchar(50),
comp varchar(50),
oc varchar(50),
bs varchar(50),
ae varchar(50),
cp varchar(50),
trd_date datetime,
set_date datetime,
mat_date datetime,
val_date datetime,
trader varchar(50),
famt float(8),
price float(8),
coupon float(8),
next_coupon datetime,
last_coupon datetime,
cpnfreq int,
cpnrate float,
cpntype int,
daycounttype smallint,
exch_notion smallint,
contract_spot float(8),
base_cur varchar(50),
year_basis int,
buy_currency varchar(50),
buy_currency varchar(50),
buy_amount float(8),
sell_currency varchar(50),
sell_amount float(8),
[timestamp] varchar(50))

EXEC master.dbo.sp_xml_removedocument @.idoc

GO

Error Msg:

A severe error occurred on the current command. The results, if any, should be
discarded.

Can anyone help here as I have no idea. I have tried reducing the size of XML to 5KB and still get the same error??

I don't think it is the size of your xml file, try the link below to modify your SQL statement. Hope this helps.

http://msdn.microsoft.com/msdnmag/issues/05/06/DataPoints/default.aspx

Friday, February 10, 2012

Bulkloading external xml file

Can I call an external url which requests a xml file when executing a
BulkLoad operation? I'm getting the error message:
Error opening the datafile. Code:80004005.
There is no problem with my database connection and I am able to access the
url from an internet browser.
Below is my code:
set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString = "provider=SQLOLEDB.1;data
source=localhost;database=db0681;uid=sa;pwd=as"
objBL.ErrorLogFile = "d:\xml\error.log"
objBL.Execute "AddressSchema.xml",
"http://mypartnerurl.com/addresslookup.pce?postcode=AAA&userId=myUser&passw ord=pwd"
set objBL=Nothing
I do not believe that the execute method implements http resolution - you
will need to resolve and retrieve your data either into a stream or to a
local file and pass the stream or file reference to the execute method.
dlr
"Paulo" <paulo@.msdn.com> wrote in message
news:7FDD076C-0CA9-4FCD-A93B-45AF015D5917@.microsoft.com...
> Can I call an external url which requests a xml file when executing a
> BulkLoad operation? I'm getting the error message:
> Error opening the datafile. Code:80004005.
> There is no problem with my database connection and I am able to access
the
> url from an internet browser.
> Below is my code:
> set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
> objBL.ConnectionString = "provider=SQLOLEDB.1;data
> source=localhost;database=db0681;uid=sa;pwd=as"
> objBL.ErrorLogFile = "d:\xml\error.log"
> objBL.Execute "AddressSchema.xml",
>
"http://mypartnerurl.com/addresslookup.pce?postcode=AAA&userId=myUser&passw o
rd=pwd"
> set objBL=Nothing
|||I do not think that you can use a URL. It should be a file name that is
reachable from the machine.
Best regards
Michael
"Paulo" <paulo@.msdn.com> wrote in message
news:7FDD076C-0CA9-4FCD-A93B-45AF015D5917@.microsoft.com...
> Can I call an external url which requests a xml file when executing a
> BulkLoad operation? I'm getting the error message:
> Error opening the datafile. Code:80004005.
> There is no problem with my database connection and I am able to access
> the
> url from an internet browser.
> Below is my code:
> set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
> objBL.ConnectionString = "provider=SQLOLEDB.1;data
> source=localhost;database=db0681;uid=sa;pwd=as"
> objBL.ErrorLogFile = "d:\xml\error.log"
> objBL.Execute "AddressSchema.xml",
> "http://mypartnerurl.com/addresslookup.pce?postcode=AAA&userId=myUser&passw ord=pwd"
> set objBL=Nothing
|||Alright, but how can I retrieve it and save it to a local file? Would please
write a VBScript example?
"Dennis Redfield" wrote:

> I do not believe that the execute method implements http resolution - you
> will need to resolve and retrieve your data either into a stream or to a
> local file and pass the stream or file reference to the execute method.
> dlr
> "Paulo" <paulo@.msdn.com> wrote in message
> news:7FDD076C-0CA9-4FCD-A93B-45AF015D5917@.microsoft.com...
> the
> "http://mypartnerurl.com/addresslookup.pce?postcode=AAA&userId=myUser&passw o
> rd=pwd"
>
>
|||I have nothing in script (although I remember seeing a internet sample using
classic ASP script to resolve and convert to stream - look on the msdn site,
there MAY be an example in the BOL for SQLXML ).
Pretty straight forward in C# to do so.
do some research.
dlr
"Paulo" <paulo@.msdn.com> wrote in message
news:01E99E0B-5CCC-4049-B715-405B139E21B4@.microsoft.com...
> Alright, but how can I retrieve it and save it to a local file? Would
please[vbcol=seagreen]
> write a VBScript example?
> "Dennis Redfield" wrote:
you[vbcol=seagreen]
access[vbcol=seagreen]
"http://mypartnerurl.com/addresslookup.pce?postcode=AAA&userId=myUser&passw o[vbcol=seagreen]

Bulkload XML to SQL2005

I have hundreds of large (500meg) XML files I need to upload into SQL2005. I followed the example from http://support.microsoft.com/default.aspx/kb/316005/en-us with no major problems. Unfortunatly my data can be several fields deep within the xml file (sample below).

I'm created a vbs file to process the bulkload.

I'm not able to figure out how to create the mapping (schema) for this file structure. I'm trying to use a mapping schema simular to what is used in the example.

How do I modify the mapping schema for my format?

Please help educate me. I am a noob, so please keep it simple.

Thanks

Charles W

XML File

<ROOT>
<Customers>
<CustomerId><IDno><pdat>2111</pdat></IDno></CustomerId>
<CompanyName><pdat>2Sean Chai</pdat></CompanyName>
<City><pdat>NY</pdat></City>
</Customers>
<Customers>
<CustomerId><IDno><pdat>2112</pdat></IDno></CustomerId>
<CompanyName><pdat>2Tom Johnston</pdat></CompanyName>
<City><pdat>LA</pdat></City>
</Customers>
<Customers>
<CustomerId><IDno><pdat>2113</pdat></IDno></CustomerId>
<CompanyName><pdat>2Institute of Art 3</pdat></CompanyName>
</Customers>
</ROOT>

XSD File

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" >
<xs:element name="ROOT" sql:is-constant="1">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Customers"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Customers" sql:relation="Customer">
<xs:complexType>
<xs:sequence>
<xs:element ref="CustomerId" sql:field="CustomerId" />
<xs:element ref="CompanyName" sql:field="CompanyName" />
<xs:element minOccurs="0" ref="City" sql:field="City"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CustomerId" type="xs:integer"/>
<xs:element name="CompanyName" type="xs:string"/>
<xs:element name="City" type="xs:NCName"/>
</xs:schema>

VBS

Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString = "provider=SQLOLEDB.1;data source=12T4581-CHUCK;database=MyDatabase;uid=XMLtest;pwd=XMLtest"
objBL.ErrorLogFile = "c:\error.log"
objBL.Execute "c:\customer3.xsd", "c:\customers3.xml"
Set objBL = Nothing

FYI:

To solve my problem, I created a .net application to modify my xml file into a format that I can work with. It really turned out to be the best solution for me because I have to make some other modifications.

I can take a 600k xml file and stip out the data I need in under 1 minute. At this rate I can prep an entire years worth of data in under 15 minutes.

Now I need to master XSD files.....

Charles W

|||

This is the recommended way to achieve your mapping. Bulkload would not support your shape of having multiple layers of wrappers around your scalar type. So Bulkload would support:

<City>NY</City>

But not:

<City><pdat>NY</pdat></City>

Bulkload XML to SQL2005

I have hundreds of large (500meg) XML files I need to upload into SQL2005. I followed the example from http://support.microsoft.com/default.aspx/kb/316005/en-us with no major problems. Unfortunatly my data can be several fields deep within the xml file (sample below).

I'm created a vbs file to process the bulkload.

I'm not able to figure out how to create the mapping (schema) for this file structure. I'm trying to use a mapping schema simular to what is used in the example.

How do I modify the mapping schema for my format?

Please help educate me. I am a noob, so please keep it simple.

Thanks

Charles W

XML File

<ROOT>
<Customers>
<CustomerId><IDno><pdat>2111</pdat></IDno></CustomerId>
<CompanyName><pdat>2Sean Chai</pdat></CompanyName>
<City><pdat>NY</pdat></City>
</Customers>
<Customers>
<CustomerId><IDno><pdat>2112</pdat></IDno></CustomerId>
<CompanyName><pdat>2Tom Johnston</pdat></CompanyName>
<City><pdat>LA</pdat></City>
</Customers>
<Customers>
<CustomerId><IDno><pdat>2113</pdat></IDno></CustomerId>
<CompanyName><pdat>2Institute of Art 3</pdat></CompanyName>
</Customers>
</ROOT>

XSD File

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" >
<xs:element name="ROOT" sql:is-constant="1">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Customers"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Customers" sql:relation="Customer">
<xs:complexType>
<xs:sequence>
<xs:element ref="CustomerId" sql:field="CustomerId" />
<xs:element ref="CompanyName" sql:field="CompanyName" />
<xs:element minOccurs="0" ref="City" sql:field="City"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CustomerId" type="xs:integer"/>
<xs:element name="CompanyName" type="xs:string"/>
<xs:element name="City" type="xs:NCName"/>
</xs:schema>

VBS

Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString = "provider=SQLOLEDB.1;data source=12T4581-CHUCK;database=MyDatabase;uid=XMLtest;pwd=XMLtest"
objBL.ErrorLogFile = "c:\error.log"
objBL.Execute "c:\customer3.xsd", "c:\customers3.xml"
Set objBL = Nothing

FYI:

To solve my problem, I created a .net application to modify my xml file into a format that I can work with. It really turned out to be the best solution for me because I have to make some other modifications.

I can take a 600k xml file and stip out the data I need in under 1 minute. At this rate I can prep an entire years worth of data in under 15 minutes.

Now I need to master XSD files.....

Charles W

|||

This is the recommended way to achieve your mapping. Bulkload would not support your shape of having multiple layers of wrappers around your scalar type. So Bulkload would support:

<City>NY</City>

But not:

<City><pdat>NY</pdat></City>

bulkload xml file with declared external dtd file

I have a several xml files to import in a sql 2005 xml datatype column with the OPENROWSET BULKLOAD.
The xml files declares an external dtd.
I must use the CONVERT option 2 to avoid an internal dtd error.
When I try to read the column, sql throws a Lists of BinaryXml value tokens not supported error because xml use special entity characters was declared in dtd.
Is there a solution for resolve using the dtd like a schema?

Paolo

Paolo,

Regarding DTD processing for imposing constraints as XSD does, no, there is no option in SQL Server 2005 to cause this validation. The extent of our DTD processing is to verify that internal subsets are syntactically correct, perform entity expansion, and apply attribute default values. We do not perform validation of the xml document per the DTD constraints.

For the error you are receiving, I am unable to reproduce this with a simple test. Please let me know if the following example works for you. If so, perhaps you can elaborate on what is different with what you are attempting.

(1)Create file on disk (c:\temp\dtd1.xml) with contents like:

<!DOCTYPE DOC SYSTEM "C:\MyExternalDTD.xml" [<!ATTLIST elem1 attr1 CDATA "defVal1">]><elem1><childelem1/></elem1>

(2)Execute following tsql to load and query out the document:

CREATE TABLE t1 (xmlCol XML)

go

INSERT t1

SELECT

CONVERT(XML, BulkColumn, 2)

FROM

OPENROWSET (BULK 'c:\temp\dtd1.xml', SINGLE_BLOB) orset(BulkColumn)

go

SELECT * FROM t1

go

Regards,

Adrian Hains

Bulkload xml data

Is any one knowing how I bulkload data with characters like to SQL? I have no problem with common English characters. Is it anny parameters in the schema file or what?

Thanks for help Joel

Ps: I youse a schema file like this one...

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

<ElementType name="namn" dt:type="string" />
<ElementType name="titel" dt:type="string" />
<ElementType name="datum" dt:type="string" />

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

<ElementType name="test" sql:relation="test">
<element type="namn" sql:field="namn" />
<element type="titel" sql:field="titel" />
<element type="datum" sql:field="datum" />
</ElementType>

</Schema>use unicode string type.

Bulkload XML Code

I have several XML file's I need bulkload into SQL 2005.
I have all my code done, but now I ran into another issue.
One of the data tags <pdata> actually contains XML tags. When I try to load
the data I get a data mapping error: Data mapping to column 'pdata' was
already found in the data. Make sure that no two schema definitions map to
the same column.
Is there any way to allow XML tags to bulkload?
I'm using a string data type.
Thanks
Charles WIf you send me the schema and the data I can take a look.
Best regards,
Monica Frintu
"Charles W" wrote:

> I have several XML file's I need bulkload into SQL 2005.
> I have all my code done, but now I ran into another issue.
> One of the data tags <pdata> actually contains XML tags. When I try to loa
d
> the data I get a data mapping error: Data mapping to column 'pdata' was
> already found in the data. Make sure that no two schema definitions map to
> the same column.
> Is there any way to allow XML tags to bulkload?
> I'm using a string data type.
>
> Thanks
> Charles W
>
>

Bulkload with default values

Hello there,
I am trying to import an xml document that have some tags as <tagname/> (so no data). So, when I did the bulk import, I am getting an error message saying the no data provided for <tagname/> and it can't be null. The table I am importing into has a defa
ult value set to blank if no value is presented.
I am trying the following:
... <xsd:element name="ship_to_add_2" default="" sql:field="ship_to_add_2" type="xsd:string"/> ...
The default="" does not do anything? What is going on?
I have to check if default works with simple type elements. If possible, can
you try making the "tagname" an attribute instead of an element and specify
default on it
thanks
Chandra
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Pardeep" <ppuar@.acdsystems.com> wrote in message
news:0F490ED0-AFC0-4C4C-92DB-560E3DB8A8A7@.microsoft.com...
> Hello there,
> I am trying to import an xml document that have some tags as <tagname/>
(so no data). So, when I did the bulk import, I am getting an error message
saying the no data provided for <tagname/> and it can't be null. The table
I am importing into has a default value set to blank if no value is
presented.
> I am trying the following:
> ... <xsd:element name="ship_to_add_2" default="" sql:field="ship_to_add_2"
type="xsd:string"/> ...
> The default="" does not do anything? What is going on?
|||Yes, I can do that and it does work that way. Is it that elements are
not supported?
Thanks
Pardeep
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||default on simple type elements is a bug then.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Pardeep Puar" <ppuar@.acdsystems.com> wrote in message
news:O1DnwFmJEHA.3104@.TK2MSFTNGP10.phx.gbl...
> Yes, I can do that and it does work that way. Is it that elements are
> not supported?
> Thanks
> Pardeep
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi Pardeep,
I tried this and it seems to work for me. Can you post your schema so that I
can investigate what is the issue?
thanks
Chandra
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Chandra Kalyanaraman [MSFT]" <chandrak@.online.microsoft.com> wrote in
message news:%23gxlgqAKEHA.2704@.TK2MSFTNGP10.phx.gbl...
> default on simple type elements is a bug then.
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Pardeep Puar" <ppuar@.acdsystems.com> wrote in message
> news:O1DnwFmJEHA.3104@.TK2MSFTNGP10.phx.gbl...
>
|||Can you please contact me via email and I can sent you my contact
information and we can then chat over the phone about this issue.
ppuar@.acdsystems.com
Thanks
Pardeep
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

BulkLoad Validation

I am new to XML and XML schemas and have been bashing my head against
a brick wall for too long with the following problem.
I want to use the BulkLoad method to read from an XML file based upon
a schema (XSD), and it should load the data to the SQL database
(SQLServer 2000).
I have included in the schema restrictions for certain fields, using
facets minlength, maxlength, length, to validate the legality of the
XML file during the BulkLoad process.
The BulkLoad works OK when the data is legal.
I want the BulkLoad to skip illegal records if a field has illegal
data.
The schema is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:simpleType name="PANStr">
<xsd:restriction base="xsd:string">
<xsd:minLength value="13" />
<xsd:maxLength value="19" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="AVNStr">
<xsd:restriction base="xsd:string">
<xsd:minLength value="0" />
<xsd:maxLength value="4" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ACStr">
<xsd:restriction base="xsd:string">
<xsd:length value="6" />
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="Config">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="PAN" type="PANStr" />
<xsd:element name="AVN" type="AVNStr" />
<xsd:element name="AC" type="ACStr" />
</xsd:sequence>
</xsd:complexType>
<xsd:key name="ConfigKey1">
<xsd:selector xpath="." />
<xsd:field xpath="PAN" />
</xsd:key>
</xsd:element>
</xsd:schema>
An example of the XML file is as follows:
<?xml version="1.0"?>
<CardValues>
<Config>
<PAN>122112443423</PAN>
<AVN>1112</AVN>
<AC>111111</AC>
</Config>
<Config>
<PAN>235675674574576567</PAN>
<AVN>1115</AVN>
<AC>111111</AC>
</Config>
<Config>
<PAN>123456454563376578900</PAN>
<AVN>1125</AVN>
<AC>111111</AC>
</Config>
</CardValues>
The first record gets written to the SQL table even though the PAN
string length is smaller (12 characters) than the restriction in the
XSD (minlength=13).
The second record gets written to the SQL table (as expected).
The third record triggers the expected error: Type of column 'PAN' in
table 'Config' is too small to hold data
'12211777777777777777777777777777777777777'
I'm under the impression that the third record fails not due to the
maxlength restriction in the schema, but because the field in the
underlying SQL table has a length of 19. That is the reason that only
the maxlength restriction is working as expected.
Any advice would greatly be appreciated
Hi,
The SQLXMLBulkload component does not validate the input XML against the
supplied XSD. For example, facets like minlength and maxlength do not make
any difference to the Bulkload process. I hope this clarifies the issue.
Thank you,
Amar Nalla
This posting is provided "AS IS" with no warranties, and confers no rights.
--
>From: gosela@.netvision.net.il (Gidon Sela)
>Newsgroups: microsoft.public.sqlserver.xml
>Subject: BulkLoad Validation
>Date: 15 Apr 2004 11:48:31 -0700
>Organization: http://groups.google.com
>Lines: 89
>Message-ID: <b840dd4e.0404151048.7d0aeefe@.posting.google.com >
>NNTP-Posting-Host: 212.235.13.114
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1082054912 10201 127.0.0.1 (15 Apr 2004
18:48:32 GMT)
>X-Complaints-To: groups-abuse@.google.com
>NNTP-Posting-Date: Thu, 15 Apr 2004 18:48:32 +0000 (UTC)
>Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!news.glorb.com!postnews1.google.com!not-for-mail
>Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.xml:22246
>X-Tomcat-NG: microsoft.public.sqlserver.xml
>I am new to XML and XML schemas and have been bashing my head against
>a brick wall for too long with the following problem.
>I want to use the BulkLoad method to read from an XML file based upon
>a schema (XSD), and it should load the data to the SQL database
>(SQLServer 2000).
>I have included in the schema restrictions for certain fields, using
>facets minlength, maxlength, length, to validate the legality of the
>XML file during the BulkLoad process.
>The BulkLoad works OK when the data is legal.
>I want the BulkLoad to skip illegal records if a field has illegal
>data.
>The schema is as follows:
><?xml version="1.0" encoding="utf-8" ?>
><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
> <xsd:simpleType name="PANStr">
> <xsd:restriction base="xsd:string">
> <xsd:minLength value="13" />
> <xsd:maxLength value="19" />
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:simpleType name="AVNStr">
> <xsd:restriction base="xsd:string">
> <xsd:minLength value="0" />
> <xsd:maxLength value="4" />
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:simpleType name="ACStr">
> <xsd:restriction base="xsd:string">
> <xsd:length value="6" />
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:element name="Config">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="PAN" type="PANStr" />
> <xsd:element name="AVN" type="AVNStr" />
> <xsd:element name="AC" type="ACStr" />
> </xsd:sequence>
> </xsd:complexType>
> <xsd:key name="ConfigKey1">
> <xsd:selector xpath="." />
> <xsd:field xpath="PAN" />
> </xsd:key>
> </xsd:element>
></xsd:schema>
>
>An example of the XML file is as follows:
><?xml version="1.0"?>
><CardValues>
> <Config>
> <PAN>122112443423</PAN>
> <AVN>1112</AVN>
> <AC>111111</AC>
> </Config>
> <Config>
> <PAN>235675674574576567</PAN>
> <AVN>1115</AVN>
> <AC>111111</AC>
> </Config>
> <Config>
> <PAN>123456454563376578900</PAN>
> <AVN>1125</AVN>
> <AC>111111</AC>
> </Config>
></CardValues>
>The first record gets written to the SQL table even though the PAN
>string length is smaller (12 characters) than the restriction in the
>XSD (minlength=13).
>The second record gets written to the SQL table (as expected).
>The third record triggers the expected error: Type of column 'PAN' in
>table 'Config' is too small to hold data
>'12211777777777777777777777777777777777777'
>I'm under the impression that the third record fails not due to the
>maxlength restriction in the schema, but because the field in the
>underlying SQL table has a length of 19. That is the reason that only
>the maxlength restriction is working as expected.
>Any advice would greatly be appreciated
>
|||Thanks for reply.
If I can't use BulkLoad to also verify the XML data before loading it
to SQL DB, what should I do to load and verify the XML data. The XML
file is very large, and speed is of an essence.
Thanks
Gidon
amarna@.online.microsoft.com ("Amar Nalla [MSFT]") wrote in message news:<027zS5JJEHA.4016@.cpmsftngxa10.phx.gbl>...[vbcol=seagreen]
> Hi,
> The SQLXMLBulkload component does not validate the input XML against the
> supplied XSD. For example, facets like minlength and maxlength do not make
> any difference to the Bulkload process. I hope this clarifies the issue.
> Thank you,
> Amar Nalla
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --
> 18:48:32 GMT)
> cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
> e.de!news.glorb.com!postnews1.google.com!not-for-mail
|||Are you using native or managed code? The appropriate solution in the given
enviornment should be used.
Irwin
This posting is provided "AS IS" with no warranties, and confers no rights
"Gidon Sela" <gosela@.netvision.net.il> wrote in message
news:b840dd4e.0404190622.1704bb43@.posting.google.c om...[vbcol=seagreen]
> Thanks for reply.
> If I can't use BulkLoad to also verify the XML data before loading it
> to SQL DB, what should I do to load and verify the XML data. The XML
> file is very large, and speed is of an essence.
> Thanks
> Gidon
> amarna@.online.microsoft.com ("Amar Nalla [MSFT]") wrote in message
> news:<027zS5JJEHA.4016@.cpmsftngxa10.phx.gbl>...
|||I am using managed code (VB.NET)
"Irwin Dolobowsky [MS]" <irwind@.mail.microsoft.com> wrote in message news:<#nZC$GmJEHA.2464@.TK2MSFTNGP10.phx.gbl>...[vbcol=seagreen]
> Are you using native or managed code? The appropriate solution in the given
> enviornment should be used.
> Irwin
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Gidon Sela" <gosela@.netvision.net.il> wrote in message
> news:b840dd4e.0404190622.1704bb43@.posting.google.c om...
> 18:48:32 GMT)
|||You'd have to use the XmlValidatingReader to first read through the data to
validate it. Then you could pass it to bulkload.
Check it out here:
http://msdn.microsoft.com/library/de...mberstopic.asp
Irwin
--
Irwin Dolobowsky
Program Manager - SqlXml
This posting is provided "AS IS" with no warranties, and confers no rights.
"Gidon Sela" <gosela@.netvision.net.il> wrote in message
news:b840dd4e.0404210212.3e187104@.posting.google.c om...[vbcol=seagreen]
>I am using managed code (VB.NET)
> "Irwin Dolobowsky [MS]" <irwind@.mail.microsoft.com> wrote in message
> news:<#nZC$GmJEHA.2464@.TK2MSFTNGP10.phx.gbl>...

BulkLoad Line Breaks

Hey,
Does anyone know if there is a way around XML Bulkload removing line breaks
that should be imported from xml to sql?
Thanks.
cd
Where are the linebreaks? The XML parsers have some specific rules about
line breaks that may remove them (inside attributes) or normalize them to
linefeed. If you want to not have this happen, you need to entitize them
(e.g., use for linefeed etc.)
Best regards
Michael
<CDONNICK@.wi.rr.com> wrote in message
news:mBSnd.164$%76.114@.twister.rdc-kc.rr.com...
> Hey,
> Does anyone know if there is a way around XML Bulkload removing line
> breaks that should be imported from xml to sql?
> Thanks.
> cd
>

BulkLoad in multiple tables - How to write the annotations?

My Problem: I have to import XML-Files into a complex SQlServer-DB (20
Tables,m2n-relations) via XML Bulkload.
The annotations in the Mapping-Scheme looks like:
--
<sql:relationship name="RLS_LUN" parent="RLS" parent-key="RLS_ID"
child="LUN" child-key="RLS_ID"/>
--
The elements (tablenames) are annotated with:
<xs:element name="LUN" sql:relation="LUN" sql:relationship="RLS_LUN">
--
At executing the Script for Bulkload the following error message appears:
--
Schema: the parent/child table of the relationship on 'DPI' does not match.
--
Some facts:
The tablefields are attributes.
The tables have IDs as identity-columns (must add them as attribute?)
What and where is the problem?
It would be very nice, if someone could help me, it′s important for me,
thank you in advanceThe error you received indicates that the parent and child relations in
your sql:relationship are inconsistent with the relations defined on the
parent and child sides of the relationship.
In addition, the error specifies a relationship not included in your
orginal post (DPI). Posting the entire mapping schema would probably help.
Andrew Conrad
Microsoft Corp|||Now my updated schema (still not working, but why?!?!?):
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 sp1 U (http://www.xmlspy.com) by Schlagl
Susanne (-) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
xmlns:dt="urn:schemas-microsoft-com:datatypes" elementFormDefault="qualified
"
attributeFormDefault="unqualified">
<xs:annotation>
<xs:appinfo>
<sql:relationship name="IPI_ISR" parent="IPI" parent-key="IPI_ID"
child="ISR" child-key="IPI_ID"/>
<sql:relationship name="Node_PPI" parent="Node" parent-key="Node_ID"
child="PPI" child-key="Node_ID"/>
<sql:relationship name="PPI_PTT" parent="PPI" parent-key="PPI_ID"
child="PTT" child-key="PPI_ID"/>
<sql:relationship name="PPI_DPT" parent="PPI" parent-key="PPI_ID"
child="DPT" child-key="PPI_ID"/>
<sql:relationship name="Node_ZPI" parent="Node" parent-key="Node_ID"
child="ZPI" child-key="Node_ID"/>
<sql:relationship name="ZPI_DOT" parent="ZPI" parent-key="ZPI_ID"
child="DOT" child-key="ZPI_ID"/>
<sql:relationship name="Node_ORS" parent="Node" parent-key="Node_ID"
child="ORS" child-key="Node_ID"/>
<sql:relationship name="Node_IDS" parent="Node" parent-key="Node_ID"
child="IDS" child-key="Node_ID"/>
<sql:relationship name="IDS_IBS" parent="IDS" parent-key="IDS_ID"
child="IBS" child-key="IDS_ID"/>
<sql:relationship name="Node_RLS" parent="Node" parent-key="Node_ID"
child="RLS" child-key="Node_ID"/>
<sql:relationship name="RLS_LUN" parent="RLS" parent-key="RLS_ID"
child="LUN" child-key="RLS_ID"/>
<sql:relationship name="Node_ORH" parent="Node" parent-key="Node_ID"
child="ORH" child-key="Node_ID"/>
<sql:relationship name="ORH_RHC" parent="ORH" parent-key="ORH_ID"
child="RHC" child-key="ORH_ID"/>
<sql:relationship name="Node_SDS" parent="Node" parent-key="Node_ID"
child="SDS" child-key="Node_ID"/>
<sql:relationship name="Node_ORB" parent="Node" parent-key="Node_ID"
child="ORB" child-key="Node_ID"/>
<sql:relationship name="ORB_RBL" parent="ORB" parent-key="ORB_ID"
child="RBL" child-key="ORB_ID"/>
<sql:relationship name="Node_SST" parent="Node" parent-key="Node_ID"
child="SST" child-key="Node_ID"/>
<sql:relationship name="Node_PSI" parent="Node" parent-key="Node_ID"
child="PSI" child-key="Node_ID"/>
<sql:relationship name="PSI_PRS" parent="PSI" parent-key="PSI_ID"
child="PRS" child-key="PSI_ID"/>
<sql:relationship name="Node_OPS" parent="Node" parent-key="Node_ID"
child="OPS" child-key="Node_ID"/>
<sql:relationship name="OPS_PSR" parent="OPS" parent-key="OPS_ID"
child="PSR" child-key="OPS_ID"/>
<sql:relationship name="Node_LFS" parent="Node" parent-key="Node_ID"
child="LFS" child-key="Node_ID"/>
<sql:relationship name="LFS_ILF" parent="LFS" parent-key="LFS_ID"
child="ILF" child-key="LFS_ID"/>
<sql:relationship name="ILF_LFA" parent="ILF" parent-key="ILF_ID"
child="LFA" child-key="ILF_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="SPR" sql:is-constant="1">
<xs:complexType>
<xs:sequence>
<xs:element name="NODE" sql:relation="NODE">
<xs:complexType>
<xs:sequence>
<xs:element name="DPI" sql:relation="DPI">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="Node" parent-key="Node_ID" child="DPI"
child-key="Node_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="AQS" sql:relation="AQS">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="AQS"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="rqt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rtc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rqs" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="AQS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="OPI" sql:relation="OPI">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="OPI"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="did" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="odc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="OPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="OVE" sql:relation="OVE">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="OVE"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="vid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="vck" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="arn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="vst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="srq" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dck" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="OVE_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="TSQ" sql:relation="TSQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="TSQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="xsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dsk" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dsi" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="TSQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="CPQ" sql:relation="CPQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="CPQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="fci" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="fsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="fps" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="CPQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="WLQ" sql:relation="WLQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="WLQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="wrc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="wrt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="wrs" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="WLQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="BLQ" sql:relation="BLQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="BLQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="ect" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="bec" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="cid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="BLQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="EXL" sql:relation="EXL">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="EXL"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="nxl" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="EXL_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
<xs:attribute name="tsqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ovec" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="blqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="opic" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dpt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="wlqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="exlc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="cpqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="aqsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
</xs:complexType>
</xs:element>
<xs:element name="IPI" sql:relation="IPI">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="Node" parent-key="Node_ID" child="IPI"
child-key="Node_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="ISR" sql:relation="ISR"
sql:relationship="IPI_ISR">
<xs:complexType>
<xs:attribute name="iss" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="itt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ihp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ipu" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="iku" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="itn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ISR_ID" type="xs:integer" use="optional"/>
<xs:attribute name="IPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="iht" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="IPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="PPI" sql:relation="PPI" sql:relationship="Node_PPI">
<xs:complexType>
<xs:sequence>
<xs:element name="DPT" sql:relation="DPT"
sql:relationship="PPI_DPT">
<xs:complexType>
<xs:attribute name="lst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="tts" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lsp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pok" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="DPT_ID" type="xs:integer" use="optional"/>
<xs:attribute name="PPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="PTT" sql:relation="PTT"
sql:relationship="PPI_PTT">
<xs:complexType>
<xs:attribute name="PTT_ID" type="xs:string" use="optional"/>
<xs:attribute name="PPI_ID" type="xs:string" use="optional"/>
<xs:attribute name="xus" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xok" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sts" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xnt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="dkt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="PPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ZPI" sql:relation="ZPI" sql:relationship="Node_ZPI">
<xs:complexType>
<xs:sequence>
<xs:element name="DOT" sql:relation="DOT"
sql:relationship="ZPI_DOT">
<xs:complexType>
<xs:attribute name="ook" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ons" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="osp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="onm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sts" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ost" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="DOT_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ZPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="okt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ZPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ORS" sql:relation="ORS" sql:relationship="Node_ORS">
<xs:complexType>
<xs:sequence>
<xs:element name="ARD" sql:relation="ARD">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="ORS" parent-key="ORS_ID" child="ARD"
child-key="ORS_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="sid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lns" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="mid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lds" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ARD_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ORS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ORS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="IDS" sql:relation="IDS" sql:relationship="Node_IDS">
<xs:complexType>
<xs:sequence>
<xs:element name="IBS" sql:relation="IBS"
sql:relationship="IDS_IBS">
<xs:complexType>
<xs:attribute name="bus" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="bkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="IDS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="IBS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="IDS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="IBS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="RLS" sql:relation="RLS" sql:relationship="Node_RLS">
<xs:complexType>
<xs:sequence>
<xs:element name="LUN" sql:relation="LUN"
sql:relationship="RLS_LUN">
<xs:complexType>
<xs:attribute name="lkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="LUN_ID" type="xs:integer" use="optional"/>
<xs:attribute name="RLS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="RLS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ORH" sql:relation="ORH" sql:relationship="Node_ORH">
<xs:complexType>
<xs:sequence>
<xs:element name="RHC" sql:relation="RHC"
sql:relationship="ORH_RHC">
<xs:complexType>
<xs:attribute name="shn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="RHC_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ORH_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ORH_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="SDS" sql:relation="SDS" sql:relationship="Node_SDS">
<xs:complexType>
<xs:attribute name="ddt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sdc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sds" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="SDS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ORB" sql:relation="ORB" sql:relationship="Node_ORB">
<xs:complexType>
<xs:sequence>
<xs:element name="RBL" sql:relation="RBL"
sql:relationship="ORB_RBL">
<xs:complexType>
<xs:attribute name="rxd" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rmd" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rdc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="blc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="RBL_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ORB_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rbc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ORB_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="SST" sql:relation="SST" sql:relationship="Node_SST">
<xs:complexType>
<xs:attribute name="ssc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="SST_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="PSI" sql:relation="PSI" sql:relationship="Node_PSI">
<xs:complexType>
<xs:sequence>
<xs:element name="PRS" sql:relation="PRS"
sql:relationship="PSI_PRS">
<xs:complexType>
<xs:attribute name="apb" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="mtp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pfs" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="cap" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="tps" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="upb" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="prc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="PRS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="PSI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="psc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="PSI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="OPS" sql:relation="OPS" sql:relationship="Node_OPS">
<xs:complexType>
<xs:sequence>
<xs:element name="PSR" sql:relation="PSR"
sql:relationship="OPS_PSR">
<xs:complexType>
<xs:attribute name="PSR_ID" type="xs:integer" use="optional"/>
<xs:attribute name="OPS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="psc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="psrc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="psc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="OPS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="LFS" sql:relation="LFS" sql:relationship="Node_LFS">
<xs:complexType>
<xs:sequence>
<xs:element name="ILF" sql:relation="ILF"
sql:relationship="LFS_ILF">
<xs:complexType>
<xs:sequence>
<xs:element name="LFA" sql:relation="LFA"
sql:relationship="ILF_LFA">
<xs:complexType>
<xs:attribute name="aec" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="txt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="LFA_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ILF_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="lfp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lfn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ilc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ILF_ID" type="xs:integer" use="optional"/>
<xs:attribute name="LFS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="lsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="LFS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nty" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rdt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="snm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lrd" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rtm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="Node_ID" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

BulkLoad in multiple tables - How to write the annotations?

My Problem: I have to import XML-Files into a complex SQlServer-DB (20
Tables,m2n-relations) via XML Bulkload.
The annotations in the Mapping-Scheme looks like:
<sql:relationship name="RLS_LUN" parent="RLS" parent-key="RLS_ID"
child="LUN" child-key="RLS_ID"/>
The elements (tablenames) are annotated with:
<xs:element name="LUN" sql:relation="LUN" sql:relationship="RLS_LUN">
At executing the Script for Bulkload the following error message appears:
Schema: the parent/child table of the relationship on 'DPI' does not match.
Some facts:
The tablefields are attributes.
The tables have IDs as identity-columns (must add them as attribute?)
What and where is the problem?
It would be very nice, if someone could help me, it′s important for me,
thank you in advance
The error you received indicates that the parent and child relations in
your sql:relationship are inconsistent with the relations defined on the
parent and child sides of the relationship.
In addition, the error specifies a relationship not included in your
orginal post (DPI). Posting the entire mapping schema would probably help.
Andrew Conrad
Microsoft Corp
|||Now my updated schema (still not working, but why?!?!?):
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 sp1 U (http://www.xmlspy.com) by Schlagl
Susanne (-) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
xmlns:dt="urn:schemas-microsoft-com:datatypes" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:annotation>
<xs:appinfo>
<sql:relationship name="IPI_ISR" parent="IPI" parent-key="IPI_ID"
child="ISR" child-key="IPI_ID"/>
<sql:relationship name="Node_PPI" parent="Node" parent-key="Node_ID"
child="PPI" child-key="Node_ID"/>
<sql:relationship name="PPI_PTT" parent="PPI" parent-key="PPI_ID"
child="PTT" child-key="PPI_ID"/>
<sql:relationship name="PPI_DPT" parent="PPI" parent-key="PPI_ID"
child="DPT" child-key="PPI_ID"/>
<sql:relationship name="Node_ZPI" parent="Node" parent-key="Node_ID"
child="ZPI" child-key="Node_ID"/>
<sql:relationship name="ZPI_DOT" parent="ZPI" parent-key="ZPI_ID"
child="DOT" child-key="ZPI_ID"/>
<sql:relationship name="Node_ORS" parent="Node" parent-key="Node_ID"
child="ORS" child-key="Node_ID"/>
<sql:relationship name="Node_IDS" parent="Node" parent-key="Node_ID"
child="IDS" child-key="Node_ID"/>
<sql:relationship name="IDS_IBS" parent="IDS" parent-key="IDS_ID"
child="IBS" child-key="IDS_ID"/>
<sql:relationship name="Node_RLS" parent="Node" parent-key="Node_ID"
child="RLS" child-key="Node_ID"/>
<sql:relationship name="RLS_LUN" parent="RLS" parent-key="RLS_ID"
child="LUN" child-key="RLS_ID"/>
<sql:relationship name="Node_ORH" parent="Node" parent-key="Node_ID"
child="ORH" child-key="Node_ID"/>
<sql:relationship name="ORH_RHC" parent="ORH" parent-key="ORH_ID"
child="RHC" child-key="ORH_ID"/>
<sql:relationship name="Node_SDS" parent="Node" parent-key="Node_ID"
child="SDS" child-key="Node_ID"/>
<sql:relationship name="Node_ORB" parent="Node" parent-key="Node_ID"
child="ORB" child-key="Node_ID"/>
<sql:relationship name="ORB_RBL" parent="ORB" parent-key="ORB_ID"
child="RBL" child-key="ORB_ID"/>
<sql:relationship name="Node_SST" parent="Node" parent-key="Node_ID"
child="SST" child-key="Node_ID"/>
<sql:relationship name="Node_PSI" parent="Node" parent-key="Node_ID"
child="PSI" child-key="Node_ID"/>
<sql:relationship name="PSI_PRS" parent="PSI" parent-key="PSI_ID"
child="PRS" child-key="PSI_ID"/>
<sql:relationship name="Node_OPS" parent="Node" parent-key="Node_ID"
child="OPS" child-key="Node_ID"/>
<sql:relationship name="OPS_PSR" parent="OPS" parent-key="OPS_ID"
child="PSR" child-key="OPS_ID"/>
<sql:relationship name="Node_LFS" parent="Node" parent-key="Node_ID"
child="LFS" child-key="Node_ID"/>
<sql:relationship name="LFS_ILF" parent="LFS" parent-key="LFS_ID"
child="ILF" child-key="LFS_ID"/>
<sql:relationship name="ILF_LFA" parent="ILF" parent-key="ILF_ID"
child="LFA" child-key="ILF_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="SPR" sql:is-constant="1">
<xs:complexType>
<xs:sequence>
<xs:element name="NODE" sql:relation="NODE">
<xs:complexType>
<xs:sequence>
<xs:element name="DPI" sql:relation="DPI">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="Node" parent-key="Node_ID" child="DPI"
child-key="Node_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="AQS" sql:relation="AQS">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="AQS"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="rqt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rtc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rqs" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="AQS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="OPI" sql:relation="OPI">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="OPI"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="did" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="odc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="OPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="OVE" sql:relation="OVE">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="OVE"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="vid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="vck" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="arn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="vst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="srq" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dck" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="OVE_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="TSQ" sql:relation="TSQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="TSQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="xsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dsk" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dsi" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="TSQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="CPQ" sql:relation="CPQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="CPQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="fci" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="fsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="fps" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="CPQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="WLQ" sql:relation="WLQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="WLQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="wrc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="wrt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="wrs" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="WLQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="BLQ" sql:relation="BLQ">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="BLQ"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="ect" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="bec" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="cid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="BLQ_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="EXL" sql:relation="EXL">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="DPI" parent-key="DPI_ID" child="EXL"
child-key="DPI_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="nxl" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="EXL_ID" type="xs:integer" use="optional"/>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="DPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
<xs:attribute name="tsqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ovec" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="blqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="opic" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dpt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="wlqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="exlc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="cpqc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="aqsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
</xs:complexType>
</xs:element>
<xs:element name="IPI" sql:relation="IPI">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="Node" parent-key="Node_ID" child="IPI"
child-key="Node_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="ISR" sql:relation="ISR"
sql:relationship="IPI_ISR">
<xs:complexType>
<xs:attribute name="iss" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="itt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ihp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ipu" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="iku" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="itn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ISR_ID" type="xs:integer" use="optional"/>
<xs:attribute name="IPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="iht" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="IPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="PPI" sql:relation="PPI" sql:relationship="Node_PPI">
<xs:complexType>
<xs:sequence>
<xs:element name="DPT" sql:relation="DPT"
sql:relationship="PPI_DPT">
<xs:complexType>
<xs:attribute name="lst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="tts" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lsp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pok" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="DPT_ID" type="xs:integer" use="optional"/>
<xs:attribute name="PPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="PTT" sql:relation="PTT"
sql:relationship="PPI_PTT">
<xs:complexType>
<xs:attribute name="PTT_ID" type="xs:string" use="optional"/>
<xs:attribute name="PPI_ID" type="xs:string" use="optional"/>
<xs:attribute name="xus" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xok" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sts" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="xnt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="dkt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="PPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ZPI" sql:relation="ZPI" sql:relationship="Node_ZPI">
<xs:complexType>
<xs:sequence>
<xs:element name="DOT" sql:relation="DOT"
sql:relationship="ZPI_DOT">
<xs:complexType>
<xs:attribute name="ook" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ons" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="osp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="onm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sts" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ost" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="DOT_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ZPI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="okt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ZPI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ORS" sql:relation="ORS" sql:relationship="Node_ORS">
<xs:complexType>
<xs:sequence>
<xs:element name="ARD" sql:relation="ARD">
<xs:annotation>
<xs:appinfo>
<sql:relationship parent="ORS" parent-key="ORS_ID" child="ARD"
child-key="ORS_ID"/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="sid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lns" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="mid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lds" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ARD_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ORS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ORS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="IDS" sql:relation="IDS" sql:relationship="Node_IDS">
<xs:complexType>
<xs:sequence>
<xs:element name="IBS" sql:relation="IBS"
sql:relationship="IDS_IBS">
<xs:complexType>
<xs:attribute name="bus" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="bkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="IDS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="IBS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="IDS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="IBS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="RLS" sql:relation="RLS" sql:relationship="Node_RLS">
<xs:complexType>
<xs:sequence>
<xs:element name="LUN" sql:relation="LUN"
sql:relationship="RLS_LUN">
<xs:complexType>
<xs:attribute name="lkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="LUN_ID" type="xs:integer" use="optional"/>
<xs:attribute name="RLS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="RLS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ORH" sql:relation="ORH" sql:relationship="Node_ORH">
<xs:complexType>
<xs:sequence>
<xs:element name="RHC" sql:relation="RHC"
sql:relationship="ORH_RHC">
<xs:complexType>
<xs:attribute name="shn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rst" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="RHC_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ORH_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ORH_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="SDS" sql:relation="SDS" sql:relationship="Node_SDS">
<xs:complexType>
<xs:attribute name="ddt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sdc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="dsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sds" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="SDS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ORB" sql:relation="ORB" sql:relationship="Node_ORB">
<xs:complexType>
<xs:sequence>
<xs:element name="RBL" sql:relation="RBL"
sql:relationship="ORB_RBL">
<xs:complexType>
<xs:attribute name="rxd" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rmd" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rdc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="blc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="RBL_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ORB_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="rbc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ORB_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="SST" sql:relation="SST" sql:relationship="Node_SST">
<xs:complexType>
<xs:attribute name="ssc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="SST_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="PSI" sql:relation="PSI" sql:relationship="Node_PSI">
<xs:complexType>
<xs:sequence>
<xs:element name="PRS" sql:relation="PRS"
sql:relationship="PSI_PRS">
<xs:complexType>
<xs:attribute name="apb" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="mtp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pfs" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="cap" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="tps" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="upb" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="prc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="PRS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="PSI_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="psc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="PSI_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="OPS" sql:relation="OPS" sql:relationship="Node_OPS">
<xs:complexType>
<xs:sequence>
<xs:element name="PSR" sql:relation="PSR"
sql:relationship="OPS_PSR">
<xs:complexType>
<xs:attribute name="PSR_ID" type="xs:integer" use="optional"/>
<xs:attribute name="OPS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="psc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="psrc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pnm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="pkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="psc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="OPS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="LFS" sql:relation="LFS" sql:relationship="Node_LFS">
<xs:complexType>
<xs:sequence>
<xs:element name="ILF" sql:relation="ILF"
sql:relationship="LFS_ILF">
<xs:complexType>
<xs:sequence>
<xs:element name="LFA" sql:relation="LFA"
sql:relationship="ILF_LFA">
<xs:complexType>
<xs:attribute name="aec" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="txt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="LFA_ID" type="xs:integer" use="optional"/>
<xs:attribute name="ILF_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="lfp" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lfn" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lkw" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ilc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="ILF_ID" type="xs:integer" use="optional"/>
<xs:attribute name="LFS_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="lsc" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="LFS_ID" type="xs:integer" use="optional"/>
<xs:attribute name="Node_ID" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="nty" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rdt" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="sid" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="snm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="lrd" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="rtm" type="xs:string" use="required"
sql:datatype="nvarchar(255)"/>
<xs:attribute name="Node_ID" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

BulkLoad and .xsd problem

I would like to load a xml file to a database. For reasons this I use the
BulkLoad
COM object model. The elements of the project are following:
The XML file:
--
<?xml version="1.0" encoding="ISO8859-2" ?>
<export>
<ceg id="0000000147">
<rovat id = "0">
<alrovat id = "1">
<mezo id = "bir">piros</mezo>
<mezo id = "cf">tarka</mezo>
</alrovat>
</rovat>
<rovat id = "2">
<alrovat id = "1">
<mezo id = "nev">FA-MAG Ipari Kisszovetkezet</mezo>
</alrovat>
</rovat>
</ceg>
<ceg id="0000000153">
etc.
</ceg>
</export>
The columns of the tblExport table in the DB:
---
ceg_id char(10)
rovat_id varchar(10)
alrovat_id varchar(10)
mezo_id varchar(50)
mezo_text varchar(1000)
The following xsd file has been used:
--
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="ceg" sql:relation="[tblExport]">
<xsd:complexType>
<xsd:choice>
<xsd:element name="rovat" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="alrovat" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="mezo" sql:field="mezo_text"
minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="id"
sql:field="mezo_id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" sql:field="alrovat_id"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" sql:field="rovat_id"
type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:attribute name="id" sql:field="ceg_id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
I've expected the following result set (and I would like to get same):
ceg_id rovat_id alrovat_id mezo_id mezo
_text
----
0000000147 0 1 bir piros
0000000147 0 1 cf tarka
0000000147 2 1 nev FA-MAG Ipari Kisszovetkezet
0000000153 etc.
But I've got this:
ceg_id rovat_id alrovat_id mezo_id mezo
_text
----
0000000147 Null Null Null Null
0000000153 Null Null Null Null
etc.
Why? I tried to change the xsd file at many places and many times. For
example I changed <xsd:choice> to <xsd:sequence> but the BulkLoad
expected a reletionship on 'rovat'. But I don't want to take an extra table.
If I use sql:is-constant annotation an error will be raised saying that
constant element has no attribute. In most cases I don't get error but no
records will be generated.
Has anybody a good suggestion? I would be grateful for any help.
Thanks.
D. AttilaYou have to use xsd:sequence instead of xsd:choice and specify
sql:is-constant="1" on the elements 'rovat' and 'alrovat'.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
news:B08BA56A-FAD0-4DDE-A0B7-1FA57EA7C27B@.microsoft.com...
> I would like to load a xml file to a database. For reasons this I use the
> BulkLoad
> COM object model. The elements of the project are following:
> The XML file:
> --
> <?xml version="1.0" encoding="ISO8859-2" ?>
> <export>
> <ceg id="0000000147">
> <rovat id = "0">
> <alrovat id = "1">
> <mezo id = "bir">piros</mezo>
> <mezo id = "cf">tarka</mezo>
> </alrovat>
> </rovat>
> <rovat id = "2">
> <alrovat id = "1">
> <mezo id = "nev">FA-MAG Ipari Kisszovetkezet</mezo>
> </alrovat>
> </rovat>
> </ceg>
> <ceg id="0000000153">
> etc.
> </ceg>
> </export>
> The columns of the tblExport table in the DB:
> ---
> ceg_id char(10)
> rovat_id varchar(10)
> alrovat_id varchar(10)
> mezo_id varchar(50)
> mezo_text varchar(1000)
> The following xsd file has been used:
> --
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xsd:element name="ceg" sql:relation="[tblExport]">
> <xsd:complexType>
> <xsd:choice>
> <xsd:element name="rovat" minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="alrovat" minOccurs="0"
> maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="mezo"
sql:field="mezo_text"
> minOccurs="0" maxOccurs="unbounded">
> <xsd:complexType>
> <xsd:attribute name="id"
> sql:field="mezo_id" type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> <xsd:attribute name="id" sql:field="alrovat_id"
> type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> <xsd:attribute name="id" sql:field="rovat_id"
> type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:choice>
> <xsd:attribute name="id" sql:field="ceg_id" type="xsd:string" />
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> I've expected the following result set (and I would like to get same):
> ceg_id rovat_id alrovat_id mezo_id mezo_text
> ----
> 0000000147 0 1 bir piros
> 0000000147 0 1 cf tarka
> 0000000147 2 1 nev FA-MAG Ipari Kisszovetkezet
> 0000000153 etc.
> But I've got this:
> ceg_id rovat_id alrovat_id mezo_id mezo_text
> ----
> 0000000147 Null Null Null Null
> 0000000153 Null Null Null Null
> etc.
> Why? I tried to change the xsd file at many places and many times. For
> example I changed <xsd:choice> to <xsd:sequence> but the BulkLoad
> expected a reletionship on 'rovat'. But I don't want to take an extra
table.
> If I use sql:is-constant annotation an error will be raised saying that
> constant element has no attribute. In most cases I don't get error but no
> records will be generated.
> Has anybody a good suggestion? I would be grateful for any help.
> Thanks.
> D. Attila
>
>|||Thanks, but I have tried it. I get the following error:
.....constant/fixed element cannot have attributes.....
But I need these attributes.
D.A.
"Bertan ARI [MSFT]" wrote:

> You have to use xsd:sequence instead of xsd:choice and specify
> sql:is-constant="1" on the elements 'rovat' and 'alrovat'.
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> "Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
> news:B08BA56A-FAD0-4DDE-A0B7-1FA57EA7C27B@.microsoft.com...
> sql:field="mezo_text"
> table.
>
>|||Sorry my mistake. I didn't see the attributes.
Unfortunately, your scenario is currently not supported by Bulkload.
Currently we do not allow attributes on constant elements and there are no
future plans to support it.
You may use XSLT to transform the Xml into a shape Bulkload can support or
you may use OpenXml which doesn't have this limitation.
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
news:CFB3D497-86E8-4207-97EA-F3EC42D2DEE5@.microsoft.com...
> Thanks, but I have tried it. I get the following error:
> .....constant/fixed element cannot have attributes.....
> But I need these attributes.
> D.A.
> "Bertan ARI [MSFT]" wrote:
>
rights.
the
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
maxOccurs="unbounded">
sql:field="alrovat_id"
/>
> ----
> ----
that
no|||Thanks for your response.
D.A.
"Bertan ARI [MSFT]" wrote:

> Sorry my mistake. I didn't see the attributes.
> Unfortunately, your scenario is currently not supported by Bulkload.
> Currently we do not allow attributes on constant elements and there are no
> future plans to support it.
> You may use XSLT to transform the Xml into a shape Bulkload can support or
> you may use OpenXml which doesn't have this limitation.
> --
> Bertan ARI
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> "Danyi, Attila" <DanyiAttila@.discussions.microsoft.com> wrote in message
> news:CFB3D497-86E8-4207-97EA-F3EC42D2DEE5@.microsoft.com...
> rights.
> the
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> maxOccurs="unbounded">
> sql:field="alrovat_id"
> />
> that
> no
>
>