Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Faster way to fill Array with ADO recordset
Message
From
31/10/2002 03:27:05
 
 
To
25/10/2002 00:45:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00715267
Message ID:
00717241
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform