General information
Category:
Coding, syntax & commands
Title:
Changing cursor properties in runtime
I have a method that changes the .Database property of Cursor objects in the Dataenvironment to point to the correct data folder, rather than my development folder. I have .AutoOpenTables = .F. for these dataenvironments, and do DataEnvironment.OpenTables() after setting the property. I have one form where the OpenTables() was giving me the "Object is not contained in a form" error, which I asked about in another thread. Searching help for insight, I found this:
"Note that setting a cursor object property at run time generates an error (with the exception of the Filter and Order properties, which can be set at run time). For a new property setting to take effect, you must call the CloseTables and OpenTables methods for the data environment."
I thought that I was solving this common problem in the right way. What is the right way to ensure that a DataEnvironment opens data from the correct folder and not from some copy? This code has always worked, except for this one form, and the error doesn't obviously point to this rule.
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