Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADDOBJECT
Message
From
15/09/1999 11:55:53
 
 
To
15/09/1999 11:35:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00264974
Message ID:
00265016
Views:
26
John,

I am trying to add tables to the data environment of a form. This needs to be done dynamically since the number of tables and their names are customizable by the user. I really don't have a problem with AddObject creating a cursor as much as the rest of the code to attach the tables to the data environment. This is my Code which will not work.

Dime gsMyCursor(5)
For myx = x To ALEN(gnTables)
With ThisForm.DataEnvironment
.AddObject(gsMyCursor(myx), "cursor")
.gsMyCursor(myx).DataBase = "c:\MyFolder\Apps\Church Books\churchdata.dbc"
.gsMyCursor(myx).CursorSource = gaTables(myx)
.CloseTables()
.OpenTables()
EndWith
Next myx
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform