dbTalk Databases Forums  

Import XML file to SQL Server 2000

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Import XML file to SQL Server 2000 in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Veep
 
Posts: n/a

Default Import XML file to SQL Server 2000 - 04-15-2005 , 01:01 PM






Hello,

I received an XML export of a database from a program called Reference
Manager. It is a single table.

I need to import it to SQL Server 2000. The DTS wizard has no option to
accept xml in the drop down. How would I go about importing it?

The Wizard does not have those options.

To top it off, I am using the client tools.

Suggestions?

Thanks,

V

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Import XML file to SQL Server 2000 - 04-18-2005 , 02:37 AM






MS don't supply an OLE-DB XML provider, but Merant/Data Direct have one.

MS do supply the SQLXML web release for SQL 2000 that includes the XML
Bulk Load tool. This can be used via a Script Task, something like this, but
this is incomplete I know-

Function XMLBulkLoad(xmlDom, sXSDFile, sErrLog)
Dim oXMLBulkLoad

' Configure Bulk Insert and execute
Set oXMLBulkLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.3.0")
oXMLBulkLoad.ConnectionString =
GetConnectionString(DTSGlobalVariables.Parent.Conn ections("Lite"))
oXMLBulkLoad.ErrorLogFile = sErrLog
oXMLBulkLoad.CheckConstraints = True
oXMLBulkLoad.SchemaGen = False
oXMLBulkLoad.SGDropTables = False
oXMLBulkLoad.KeepIdentity = False
oXMLBulkLoad.Execute sXSDFile, xmlDom

Set oXMLBulkLoad = Nothing
End Function

This is documented in the SQLXML stuff.

--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"Veep" <Veep (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,

I received an XML export of a database from a program called Reference
Manager. It is a single table.

I need to import it to SQL Server 2000. The DTS wizard has no option to
accept xml in the drop down. How would I go about importing it?

The Wizard does not have those options.

To top it off, I am using the client tools.

Suggestions?

Thanks,

V



Reply With Quote
Reply




Thread Tools
Display Modes

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

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



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