Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Faster way to fill Array with ADO recordset
Message
De
31/10/2002 03:27:05
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
 
 
À
25/10/2002 00:45:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00715267
Message ID:
00717241
Vues:
18
Hi,

assuming you have ***a lot*** of records to process

local laItems,
.oRS1=.oConnect.Procura_Geral(lcTable)
DIMENSION laItems[.oRS1.RecordCount,2];
.combobox1.aItems[.oRS1.RecordCount,2]
with .oRS1
.MoveFirst
FOR lni = 1 TO .RecordCount
laItems[lni,1] = .Fields('c_codigo').value
laItems[lni,2] = .Fields('c_descri').value
.MoveNext
NEXT lni
acopy (laItems, .combobox1.aItems)

If you get the numerical offsets for c_codigo and c_descri
into 2 memory variables, that will speed it up as well.
Try a local reference for .fields as well.

HTH

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform