Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bulk import vfp data sql-server
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00806781
Message ID:
00811302
Views:
117
Aashish,
I want to upload this table from a web-page to sql-server. I do this for a number of smaller tables because my customer does not want to link vfp-tables on a web-page. The upload is needed to give the webpages some data to look at. At the end a VFP7 com-server is started that returns a pdf-file. This file is shown in the browser.
The upload of the smaller tables is no problem. But one table contains 100,000 records and uploading is slow.
This method looked promissing but it does not work. I´m not sure if the problem is created by the xml-file that VFP7 has created or by some other reason.

Thanks,

Ron


>Hi Ranjan,
>
>Why not to upsize vfp table to MS SQL?
>
>Aashish
>
>>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>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform