I need to import a vfp table into sql-server 2000.
I do the following:
- export my table with
CursorToXML("tmptracking", "c:\temp\msdstracking.xml", 1, 2 + 32 + 512, 0, "c:\temp\msdstracking.xsd")
- import the data as follows:
BulkLoadObj = CreateObject("SQLXMLBulkLoad.SQLXMLBulkLoad.3.0")
BulkLoadObj.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;Initial Catalog=MSDS ;Data Source=NL9BD770J;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;User Id=sa;pwd=; network library=dbmssocn"
*'Add Code to set other properties of the XML Bulk Load object as required
BulkLoadObj.ErrorLogFile = "c:\temp\msdstracking.err"
BulkLoadObj.IgnoreDuplicateKeys = .T.
BulkLoadObj.Transaction = .T.
BulkLoadObj.Execute("c:\temp\msdstracking.xsd","c:\temp\msdstracking.xml")
BulkLoadObj = NULL
The most interesting part: no error is generated but nothing is imported into sql-server. It does not even generate an error.
What am I missing here?
The xml file contains just one line:
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<VFPData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:\temp\msdstracking.xsd">
<tmptracking>
<trarktx></trarktx>
<trernam>DC841</trernam>
<trkunnr>0006814856</trkunnr>
<trland1>NL</trland1>
<trmaktx>LDL Emmerich Bg 5Kg BPM 4inBox</trmaktx>
<trmatnr>000000006100001679</trmatnr>
<trname1>NOVA CHEMICALS NETHERLANDS B.V.</trname1>
<trname2></trname2>
<tronzin></tronzin>
<trort01>BREDA</trort01>
<trprod_co>65998</trprod_co>
<trpstlz>4800 DJ</trpstlz>
<trregio></trregio>
<trstras>PO Box 3355</trstras>
<trvbeln>6123020934</trvbeln>
<trwadat>20000327</trwadat>
<trzeof></trzeof>
<trrev_nr>0.2</trrev_nr>
<trregion>ROW</trregion>
</tmptracking>
</VFPData>