Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying records from one table to another in FPW 2.6
Message
 
À
19/03/1997 14:33:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00024865
Message ID:
00024876
Vues:
37
>>>I have a routine that copies records from one table to another. Sounds simple, but when APPEND is used, the size of the tables exceeds the available memory and cause a Stack Fault.
>>>
>>>I rewrote it so that the records write over existing records (based on matching criteria) using SCATTER MEMVAR and GATHER MEMVAR and use a INSERT - SQL if more records are needed. The problem is that this takes a long time. I can watch the records being written over. The matching criteria is by State and if I have a lot of states to copy, it is painful. (Even one state is painful.)
>>>
>>Can you do a straight delete, pack, and insert? That should be a lot faster...
>
>I have been warned against deleting and packing becuase of the risk of data corruption. Have you had any experience with this? I am using FoxPro in a client environment with the tables on a server and the front end on the users' PCs. (I may resort to packing even though because the current solution isn't so hot.)

Yes, I do fairly frequent 'mass purges' in server-based tables, and very rarely have had any problems (but always do backups, of course). You'll have to do your packs (and reindexes) at odd hours when no users are on (or schedule regular downtimes with announcements), that's a slight drawback, but I have little choice with huge tables...otherwise it works fine.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform