General information
Category:
Forms & Form designer
Title:
Where to put CREATE CURSOR code
I've written a fairly large VFP app, but it is suffering from some intermittent memory leak-like problems resulting in C0000005s.
I believe the problem is that I create cursors in the Data Environment BEFOREOPENTABLES code, which then don't get closed properly when the form exits.
What I want to do is to open a couple of regular database tables, and I included them visually in the Data Environment.
But I also want to have access to a couple of cursors and I put that CREATE CURSOR TEMP1 ... code into the BEFOREOPENTABLES of the DataEnvironment.
Here is my question:
Where do I need to put code to CLOSE these cursors so that they will always get closed properly:
Currently I have code like
USE IN (SELECT("TEMP1"))
in the AFTERCLOSETABLES of the data environment, but I just realized that when AfterCLoseTables fires, it's not even always selecting the right Datasession.
Any suggestions are massively appreciated!
Hermann Strijewski,
Clearwater, FL
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