Tutorials to .com

Tutorials to .com » Asp » Optimization » EOF records do not have to speed up the cycle of (vb) posted

EOF records do not have to speed up the cycle of (vb) posted

Print View , by: iSee ,Total views: 9 ,Word Count: 114 ,Date: Fri, 17 Apr 2009 Time: 9:34 PM

Usually we use the following code to record the cycle:

Do while not records.eof
combo1.additem records! [Full Name]
records.movenext
loop

The result is a database for each cycle should be the end of a test data. A large number of records in the circumstances, a considerable waste of time. Use the following code, can be nearly 1 / 3 the speed of:

records.movelast
intRecCount = records.RecordCount
records.movefirst

for intCounter = 1 to intRecCount
combo1.additem records! [Full Name]
records.movenext
next intCounter


Asp Optimization Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.