Hi guys,
I wanted to insert some data from an xml into a sql2000 table, using a
vbscript.
The vbs runs without any errors, but noo data is inserted into the table.
Can anyone take a look at the following files and tell me what I'm doing
wrong?
Is there a tool that I need to have for SQL2000, a dll, ...?
Any help is appreciated.
TIA,
Bart.
this is the content of the xml - file:
*************
<?xml version = '1.0'?>
<Employees>
<EMPLOYEE>
<ID>1</ID>
<NAME>Hanssen Bart</NAME>
</EMPLOYEE>
<EMPLOYEE>
<ID>3</ID>
<NAME>Verrykt Peter</NAME>
</EMPLOYEE>
</Employees>
*************
the mapping schema:
*************
<?xml version="1.0" ?>
<Schema name="test"
xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<ElementType name="ID"/>
<ElementType name="NAME"/>
<ElementType name="EMPLOYEE" sql:relation="Employees">
<Element type="ID" sql:field="ID"/>
<Element type="NAME" sql:field="Name"/>
</ElementType>
<ElementType name="Employees">
<Element type="EMPLOYEE"/>
</ElementType>
</Schema>
*************
...and the code of the vbs:
*************
Set objBulkLoad = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBulkLoad.ConnectionString = "Provider=SQLOLEDB;Data
Source=vac-dev.vacnet.be;UID=sa;PWD=intruder90210;DATABASE=Sportuitslagen"
msgbox "start"
objbulkload.errorlogfile = "c:\projects\sport\bulkloaderrors.xml"
objBulkLoad.SchemaGen = true
objBulkLoad.Execute "c:\E Should be very easympSchema.xml", "c:\emp.xml"
msgbox "end"
Set objBulkLoad = nothing
*************