MYDE.PRG define class DE as DataEnvironment AutoOpenTables = .F. AutoCloseTables = .F. add object Cursor1 as Cursor with ; Database = 'MyDBC.DBC', ; CursorSource = 'MyTableName', ; Name = 'Cursor1' procedure Init THIS.OpenTables() endproc procedure Destroy THIS.CloseTables() endproc procedure Release release THIS endproc enddefineThen in the Form methods:
Load Method local loDE loDE = newobject('DE','MYDE.PRG') THIS.AddProperty('DE',loDE) Destroy Method THIS.DE.Release()You won't be able to modify the DE visually or use the implicit control binding functionality unless you use VFP 8 but this works.