How can I push a VFP Table to a SQL Server.

From: Luis I. Gomez (GomezL_at_CollectionSoftware.com)
Date: 02/23/05


Date: Wed, 23 Feb 2005 13:35:08 -0500

Basically I have a VFP Table with type types of records.

1) New Records that need to be Appended

2) Existing Records that need to be updated.
    This step is a bit more complicated, because some of the record may
contain blank fields, and the SQL database should not be erased, so
essentially we are "Merging" the new information on the existing records.

Our current process is to "Join" the SQL server table with the local Table
to indentify "New Records". This works properly, except as we grow to 2+
Million records, it's getting slow.

We have a field called MASTERKEY. This field is populated with either a
new key to be appended, or the proper key to update the record.

Our goal is to append all the new records, and update the existing records,
and we are looking for a high performance solution.

Currently, we are looping through our local cursor, and using SQL
passthrough to update/append each record individually.

Any ideas?

Luis I. Gomez
GomezL@CollectionSoftware.com