Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM
Message
De
11/06/2001 11:52:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00517820
Message ID:
00517835
Vues:
13
>I have read several places where I should not use the APPEDN FROM commnad in code. They suggest that this is a command window command. What else should I use? I have used INSERT-SQL for one line of MEMVAR. This does me no good when the table I have has numerous records in it and I don't know how many. I tried the ARRAY thing but never really have a lot of success with that. What else can I do?

HTH

Select Table_A && Source table
Go Top && Position the record pointer where ever you want it
Scan && You can put an optional For < expression > to control which records your scan actually lands on
< Put insert statement here >
EndScan

Typically this scans/inserts the entire table. But there's a lot of flexibility with this code. If the table you're inserting into is a remote SQL table ( Oracle or SQL server etc. ), this is about as fast as you can go if your source table is a CURSOR or VFP table since even bulk inserts from VFP6x tables/cursors are sent one row at a time into MS SQL Server. (You can confirm this with SQL Profiler.)

If you are using ADO records sets, then you can do a bulk update from the recordset object.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform