Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 problem in using SQLXML

Author  Topic 

vishu_av
Yak Posting Veteran

69 Posts

Posted - 2009-01-01 : 23:46:28
Hi All,

I have a XML file and i wish to use SQLXML to load it into
my database using vb script.
I wish to creat the staging table/s through the script as i am unaware of the XML structure, which i think the SQLXMLBulkload
offers through this,

Dim objBL
Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0")
objBL.ConnectionString = "provider=SQLOLEDB;data source=localhost;database=tempdb;integrated security=SSPI"
objBL.ErrorLogFile = "c:\error.log"

objBL.CheckConstraints=true
objBL.XMLFragment = True
objBL.SchemaGen = True
objBL.SGDropTables = True

objBL.Execute "CustDetailsMapping.xml", "Customer.xml"
Set objBL = Nothing

The problem is, I have been unable to create a valid Mapping schema for my XML "CustDetailsMapping.xml" by using the annotation and sql:relation bindings.

Can anybody suggest what could be done in a situation like this?

Thanks in Advance..!!!



   

- Advertisement -