I use this vbscript file to reference a XML file to map fields from a xml file to database columns in a certain table.

VB Script File

Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad")
objBL.ConnectionString = "provider=SQLOLEDB.1;data source=MYCOMP;database=XMLTemp;uid=SA;pwd=1"
objBL.ErrorLogFile = "C:\Centive Source\Centive\XML\VB\SQLserver XML Bulk Copy\error.log"
objBL.Execute "C:\Centive Source\Centive\XML\VB\SQLserver XML Bulk Copy\planandawarddetailsmapping.xml", "C:\Projects\Redman\XML\VB\SQLserver XML Bulk Copy\File1.xml"
Set objBL = Nothing

Mapping xml file

<?xml version="1.0" ?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlnst="urn:schemas-microsoft-com:xmlatatypes"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" >

<ElementType name="plan_short_name" dt:type="string"/>
<ElementType name="plan_name" dt:type="string"/>
<ElementType name="award_short_name" dt:type="string"/>
<ElementType name="award_type" dt:type="string"/>
<ElementType name="user_defined_id" dt:type="string"/>
<ElementType name="exchange_rate" dt:type="string"/>


<ElementType name="employee_details" sql:is-constant="1">
<element type="plan_and_award_details" />
</ElementType>

<ElementType name="plan_and_award_details" sql:relation="plan_and_award_details">
<element type="plan_short_name" sql:field="plan_short_name"/>
<element type="plan_name" sql:field="plan_name"/>
<element type="award_short_name" sql:field="award_short_name"/>
<element type="award_type" sql:field="award_type" />
<element type="user_defined_id" sql:field="user_defined_id"/>
<element type="exchange_rate" sql:field="exchange_rate"/>
</ElementType>

</Schema>


As soon as i run the vbscript file it presents an windows script host error saying the following....

"Data mapping column 'exchange_rate' was already found in the data. Make sure that no two schema definitions map to the same column."

As you can see the mapping file does not contain more then one scheme definition mapped to the same column...

Any idea what might cause this problem.?