Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bulk import vfp data sql-server
Message
 
To
16/07/2003 07:48:44
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00806781
Message ID:
00811298
Views:
65
Hi Wim,

long time no hear (see). How are you doing?
I have created the upload with ado but this is very slow when pushing 100,000 records into sql-server. It must be able to import data faster than VFP. We are using a potent 2K server for IIS, SQL-server, VFP-com, Adobe Distiller etc. In the end we generate a pdf-file that is returned to the web-browser.

I have used several techniques but the upload is painfully slow and takes too long to run. I was hoping to find a ´faster´ method. This one looked promissing....but I can´t get it to work.

Are you still working in Amsterdam?

Ron B

>>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?
>
>Hi Ron, how is live? Long time since we last spoke... Anyways maybe this helps?
>
>You could consider creating a updatable remote view on the SQL table and just simply append from into the remote view. ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform