Outside of the Data Environment object of the Form Designer, the AutoOpenTables, AutoCloseTables, and OpenViews properties can only be set at the class definition level in a .prg :
DEFINE CLASS NewDataEnvironment AS DataEnvironment
AutoOpenTables = .F.
AutoCloseTables = .T.
OpenViews = 0
After loading cursors into a BizObject's
empty DataEnvironment, OpenTables has to be called explicitly even if AutoOpenTables = .T. This is because the DataEnvironment had no cursors to begin with.
If BizObjects are kept separate from forms, then you can use form classes (with no DataEnvironments) and then just set the forms' DataSessionID to that of a BizObject.
>I think that AutoOpenTables is probably only hooked in to the event model for forms. So it would make sense that you would have to call OpenTables explicitly.
- Jeff