Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change database name in form at runtime
Message
 
To
01/05/2000 14:16:27
Larry Long
ProgRes (Programming Resources)
Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00364785
Message ID:
00364820
Views:
26
>>how to change database name in form at runtime. I have databases in different directories with same struct with diff. data. I want my forms to access the relevent database depending on the choice selected. But it seems that form hard code the DE cursors.
>>
>>Rajesh
>1) Assuming you save the DBC path to an object called oSysinfo.DBCPath
>
>In the DE beforeopentables method issue...
>
>This.Cursor1.DataBase = oSysinfo.DBCPath
>
>for each view

Or all at once (assuming that all your cursors in the particular form belong to the same DBC:

thisform.SetAll("Database",fullDBCpath,"Cursor")
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform