XMLBulkLoad

Hi,

I have been working on SQL Server 2005 nearly for an year now. In Beta2, there is class XMLBulkLoad which can be used to bulk copy data from an XML file into SQL Server using a mapping schema. Now I have installed the Yukon April CTP and OMG the XMLBulkLoad class is missing. Does anybody have any idea whether it has been removed or changed to something else? It was earlier "unofficially" in the "System.Data.SqlXml" assembly in the namespace "MS.Internal.Data.SqlXml".
I have been searching for these changes with no success. Can anybody also please tell where to find the changes for this build.

Thanks and Regards,
Shiva.

[685 byte] By [cssrk] at [2008-2-17]
# 1

This is part of SQLXML4 that ships with the April CTP.
Use COM-Interop: “Add Reference” in Visual Studio to import

Code looks like:

[STAThread]
static void Main(string[] args) {
SQLXMLBulkLoad3Class bl = new SQLXMLBulkLoad3Class();
try {
bl.ConnectionString = connString;
bl.KeepIdentity = false;
bl.Execute(“myschema.xsd”,”mydata.xml”);
}
Catch(Exception e) { Console.WriteLine(e.Message);}}

HTH
Michael

MRys at 2007-10-6 > top of Msdn Tech,SQL Server,SQL Server XML...
# 2
Hi MRys,
Thanks for the reply. I do know that, there is provision for XML Bulk load using SQLXML com interop. But what I was using, was a .NET assembly. Since COM interop has it's own performance issues, I don't want to use that. I just want to know if it has been removed in the April CTP or changed to a different namespace or class.

Thanks and regards,
Shiva.

cssrk at 2007-10-6 > top of Msdn Tech,SQL Server,SQL Server XML...
# 3
Hi Shiva,

Unfortunately, we have postponed the managed for SQLXML Bulkload from current release. What you had was bits before had postponed the project.

Right now, only available option is native bulkload that Michael had pointed out.

Thanks.

Tanka

ToshibaT1 at 2007-10-6 > top of Msdn Tech,SQL Server,SQL Server XML...
# 4
Hi,

I am having trouble bulkloading xml into SQL from a stream. I am able to bulkload the XML from a file, but I want to load it into an XMLDocument first and then bulkload it. I understand that the bulkload execute command is overloaded to do this but no matter what I try I get an 'Error opening the data file.' exception. I am using SQLXML 3.0 and C#. Does anyone have any ideas?

Thanks.

cab15 at 2007-10-6 > top of Msdn Tech,SQL Server,SQL Server XML...
# 5
Hello Michael,

Will .Net managed XMLBulkLoad be included in a SQL Server service pack sometime in the future?

Thanks,
Chuck

CBagby at 2007-10-6 > top of Msdn Tech,SQL Server,SQL Server XML...
# 6
Could you please start new threads instead of piggy backing on existing ones that are marked answered? We often do not read already answered threads for new questions.

As to being able to read from a stream, I need to refer you to the documentation (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqlxml49/html/3708b493-322e-4f3c-9b27-441d0c0ee346.htm). It allows streams but only streams on XML directly, not parsed XML documents.

As to when a managed XML Bulkload will be available: I don't know since I don't work on that aspect. But I have forwarded your question to the team and hope you will get an answer soon.

Best regards
Michael

MRys at 2007-10-6 > top of Msdn Tech,SQL Server,SQL Server XML...

SQL Server

Site Classified