March 31, 2005 at 7:52 am
Hi all.
SQLserver 2000
I have never worked with XML so please forgive me if I am asking a stupid question.
I have been asked to import the contents of an Orenance Survey XML file into columns on a table in my DB.
I have created the table with a column for each node in the XML file.
How do I proceed from here ?
Thanks CCB
Here is a bit of the XML file: -
April 1, 2005 at 7:27 am
I have used the SQLXMLBulkload.3.0 add-in for SQL Server. Using a ActiveX component in a DTS package I run the follwing code:
Function Main()set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.3.0")
objBL.ConnectionString = "provider=SQLOLEDB;data source=localhost;database=XYZ;integrated security=SSPI"
objBL.ErrorLogFile = "c:\path\xyzerror.log"
objBL.Execute "C:\path\Schema.xsd", "C:\path\XYZ\file.xml"
set objBL=Nothing
Main = DTSTaskExecResult_Success
End Function
You can download the SQLXMLBulkload.3.0 from Microsoft
You need to create the schema file, but it looks as though there is predefined schema (OSDNFFeatures.xsd) And then in the schema file you will need to identify the (sql:relation="") for the table(s) to load into.
Good luck
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply