Results 1 to 2 of 2

Thread: Reading Record Set too slow

  1. #1

    Thread Starter
    Addicted Member Geoff Gunson's Avatar
    Join Date
    Jun 1999
    Posts
    241

    Post

    Hi

    I am reading a RS with minimum of about 1000 records. To move through the entire RS takes about 23 seconds for 1003 records or put it another way 0.02 seconds per record. What I have done is to open the RS using the SELECT method only retriving the feilds I am interested in. Then I setup a loop...

    Do While not RS.EOF
    RS.movenext
    Loop

    Am I doing something wrong? How can I speed up my process.

    Thanks for your time

    Geoff

  2. #2
    Lively Member Ishamel's Avatar
    Join Date
    Nov 1999
    Location
    Edinburgh, Scotland
    Posts
    112

    Post

    This loop can be used instead of the Do..Until EOF.

    It is supposed to be about 30% quicker, because it does not have to check the .EOF property each time it loops.

    Code:
    Dim iEOF as Long
    
    
    rsRecordSet.MoveLast
    iEOF = rsRecordSet.RowCount
    rsRecordSet.MoveFirst
    
    
    For iTurns = 1 To iEOF            
        rsRecordSet.MoveNext
    Next

    [This message has been edited by Ishamel (edited 11-11-1999).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width