Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing The DataEnvironment
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142671
Message ID:
00142927
Views:
29
1. Add a property to your form called DataEnvironment

2. In the form's LOAD event:

ThisForm.DataEnvironment = CREATEOBJECT("DataEnvironment")

WITH ThisForm.DataEnvironment

.AddObject("Cursor1", "Cursor")
.Cursor1.CursorSource = "C:\Data\Table1.Dbf"
.Cursor1.Alias = "MyTable

.AddObject("Cursor2", "Cursor")
.Cursor2.CursorSource = "C:\Data\Table2.Dbf"
.Cursor2.Alias = "AnotherTable

.AddObject("Relation1", "Relation1")
.Relation1.ParentAlias = "MyTable"
.Relation1.ChildAlias = "AnotherTable"
.Relation1.ChildOrder = "IndexName"
.Relation1.RelationalExpr = "FieldExpresssion"

.OpenTables()

ENDWITH

3. In the form's UNLOAD event:

ThisForm.DataEnvironment.CloseTables
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform