BDE and Multiple databases 
Author Message
 BDE and Multiple databases

>I believe you understand but I will try to be clearer. The program I am
>modifying consists of multiple executables using a database which is
>logically broken into several dbf files.  My assignment is to expand the
>program so a directory containing the dbf files represents one client
>database.  Thus, by setting up multiple directories with empty databases,
>user will be able to have unique data per client for the program.

Two ideas spring to mind regarding the above. If I have understood you
correctly, you want to create a directory containing dbf file/s pertaining
only to the customer represented by the directory name. I feel you could
create the same functionality far more simply by utilising a 'One to Many'
relationship. However, if it is imperitive that you separate all files via
directory structure, then you could create the directories/dbf's in code and
assign full path names to the tablename property at runtime. This would
bypass the need for the alias altogether which may or may not be a good
thing, depending on the circumstances. If I can help with explaination of
any of the above, or if you just want to explain your problem in greater
detail then email me. I'll try and help.

Chris B.

Wed, 18 Apr 2001 03:00:00 GMT  
 BDE and Multiple databases

> Due to the nature of the data, I am required to keep client data in
>files. (legal, etc.)  As to your second option, I would like to hear
>keep in mind I am working in a multiple executable application, where the
>main program launches the other executables.  The operator will only be
>allowed to change client databases from the main program.

It's difficult to give any real help without having a better understanding
of what you are trying to do as any ideas I may put forward may be totally
irrelevant to your app. But the basic idea behind my second suggestion is
The table component has a databasename and tablename property.
The databasename property is set to an alias (which is just an alias to a
directory path any way).When set the tablename can then be set to any table
within that directory.
You can also open a table If you leave the alias blank and put a full path
and table name into the tablename property. ie

provided you've already assigned a BDE alias called Myalias which points to

table1.databasename := 'myalias';
table1.tablename := 'atable.db';

is the same as...
table1.tablename := 'C:\apppath\data\dirname\atable.db';;

but the beauty of the second method is you can change the path whenever you
want because you're not fixed to an alias. So through the UI of the program
or however you implement it you could then do...

table1.tablename := 'C:\apppath\moredata\anotherdirname\adifferenttable.db';;

Whether this would be suitable for your app I don't know. Also how you
implement the user opening the table would also be an issue specific to your
app. You could easily create a list of tables available to your user in a
specific dir and allow them to choose one from the list, you could then
assign the chosen table to the tablename property etc.

To help you further I would need a better understanding of what you are
doing. But I will certainly try to help if I can.

Chris B.

Fri, 20 Apr 2001 03:00:00 GMT  
 [ 7 post ] 

 Relevant Pages 

1. Deploying BDE - multiple BDE installations

2. Multiple copies of BDE

3. Multiple access using BDE

4. BDE : NETDIR and multiple apps problem.

5. Modifying BDE App for multiple users

6. NETDIR with multiple versions of BDE.

7. Query on multiples databases with Delphi 3

8. HELP:Selecting data from multiple databases

9. Database access in DLL cause multiple login?

10. Multiple connections - database timeouts

11. Multiple Database Apps...

12. Tquery from Multiple Databases?


Powered by phpBB® Forum Software