Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically Setting the Data Environment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00685713
Message ID:
00685832
Vues:
16
This message has been marked as the solution to the initial question of the thread.
Hi,

A few things:

Firstly OpenTables is a method of the dataenvironment not an event. You can put your code in the BeforeOpenTables() event and leave AutoOpenTables()=.T.

Secondly code such as

USE x
USE y
USE z

will open each table in the same work area - in the above example this will result in only table z being open.

Thirdly this will NOT add tables to the DE. The best way to do this is probably to exclude all of the tables which will be optionally opened from the DE at design time then, in the BeforeOpenTables() event add them programatically eg:

WITH this
.AddObject("MyCursorX","Cursor")
.MyCursorX.Alias = "Orders"
.MyCursorX.cursorsource = "Orders.dbf"
* etc - set other cursor properties
ENDWITH

HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform