>Our application needs to switch DBCs for different data sets. The
>structure for each is the same but the data is different. Our form Data Environment is tied to the name of the DBC. I have tried setting the name of the desired DBC in the DE method - before tables are opened, but to no avail. (I used set database to ...)
>
>What is the best way to overcome this? I could ask the DE not to open/close the tables and open them explicitly, but would prefer to let the DE do its work if there is a simpler approach. It would be preferable if I could set the database once at the beginning of the application.
>
>Thanks much,
>Nancy
The generic idea is following:
*** DE.BeforeOpenTables event
Local cDatabasepath
cDatabasepath=config.datapath && some configuration table setting
Thisform(set).SetAll("Database",cDatabasepath,"Cursor")
Note: it will work if all DE tables are part of DBC. If you have free tables you should check for them, and reset Cusros.Cursorsource properties.
Edward Pikman
Independent Consultant