Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programming to manipulate multiple data directories
Message
From
16/10/2000 02:02:25
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
To
16/10/2000 00:22:58
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00429667
Message ID:
00429680
Views:
19
>I am writing a account program, which in my design, I select various company client in a listbox, program switch to various directory and manipulate the datas.
>
>For the databases design,
>I put the program files at c:\account\file\
>I put the databases under a directory : c:\account\data\
>under the above directory,
>I put data for A company at c:\account\data\acompany\
>and for B company at c:\account\data\bcompany and so on.....
>
>However, at design time, the form designer set the data environment say c:\account\data\master\account.dbc
>How to program so that I can alter the data environment runtimely, and does it possible?

you can set the database property of any cursor in the 'beforeopentables' event of the dataenvironment object to set the location of the database
something like THISFORM.DataEnvironment.Cursor1.Database = "c:\account\data\bcompany" or

THISFORM.DataEnvironment.Cursor1.Database = THISFORM.ListBox.Value
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform