Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When to close cursors
Message
 
 
To
16/05/2001 11:03:50
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00507737
Message ID:
00507877
Views:
9
>>>>Close them as soon as you're done with them.
>>>
>>>Craig;
>>>
>>>I agree. I call it "good house keeping"!
>>>
>>>Tom
>>
>>I agree too. Clean the garbage after the form is done... :)
>
>I'm not saying after the form is done. You may only need a cursor for a single method. If so, close it when you're done. I've had report prgs that require many SQL SELECTs into cursors, that are then combined and/or summarized. I close them as soon as I'm done with them. I've noticed a severe slowdown in VFP when I keep lots of unneeded cursors open.

Right. I do it this way too. For instance, if I create a cursor in Statistics method or Print method of my form, I close it immediatelly, after the method is finished. BTW, thanks for the remainder, I'll check my Statistics methods again to be sure, that cursor is closed.

Yep, just checked it, and I forgot to close. So I did it now :)
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform