General information
Category:
Coding, syntax & commands
>>Assume we have an memvar called cDesiredID
>>
>>Select Recno() as RecNum, Field1, Field2, etc from MyTable into Cursor MyCursor Where Member_ID = cDesiredID
>>
>>compared to:
>>
>>Seek cDesiredID
>>RecNoSave=Recno()
>>Copy to Array MyArray Fields AnyField, Field1,Field2, etc While Member_ID=cDesiredID
>>GoTo RecNoSave
>>For I=1 to _Tally
>> MyArray(i,1)=RecnoI()
>> Skip
>>EndFor
>>Use Mycursor
>>Zap
>>Append From Array MyArray
>>
>>Result: The second method, surprising to me, is much, much faster when MyCursor contains only a few (less than a dozen) records. I haven't tested it with more (not necessary in my app).
2 things
first - using the select SQL shouldn't be much slower if your
indexes are set right - but basically if every thing is
ok the select will do something simmilar
regarding option 2 - why use an array, u can simply CREATE CURSOR and copy directly into it
Arnon
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only