Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a better way to replicate between db's than thi
Message
From
07/11/2001 11:57:52
 
 
To
07/11/2001 11:40:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00578549
Message ID:
00578558
Views:
12
Pat,

Have you identified which part is slow? You don't show real code here, so there is more one place that is unclear.

How do you scan for records needing replication? You could have an index on the replication flag, and speed up that part of the process.

If you are using APPEND FROM to pull in new records, that could be slow (and troublesome). Why not SCATTER the local record every time?
SCATTER the local record && I like to use SCATTER NAME command
SELECT mastertable
IF !INDEXSEEK()  && lookup in master...you need to add parameters
   APPEND BLANK
ENDIF
GATHER to the master record
>I have users with a local copy of a database on their laptop machines. When they want to copy new/changed records to the master database (Network connection), they select a checkbox when viewing those records. The next time they are connected to the master database, they run a replication function which looks like this:
>
scan for a record with replication = .t.
 search the master database for a matching record
 IF the record does not already exist in the master
   Append from the local database
  ELSE
    SCATTER the local record
    GATHER to the master record
  ENDIF
endscan
>
>While this does work, it seems pretty slow. Is there a better way to do such a thing?
>
>Thanks,
>Pat
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform