General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only