Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement