This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to share the same BDE table across two separate programs?

I have two RAD Studio programs that access the same BDE TTable tables. These tables are stored on our Windows network drive share (U:\tables). Should the NETDIR on both programs be set to a location on that network drive (such as U:\network\) that both computers can access? Or should each program set the NETDIR to it’s own local location (such as C:\network)? 

Also, what other steps do I need to take to make sure both programs can access the db tables without the programs crashing and getting leftover LCK files?  Is there more to it than “make sure all your TTables are closed, then deleted, then pointers set to 0”?

No Data
  • Both programs should use the same netdir, and it has to be a location every user of the programs has write access to.  The multiuser support of the BDE depends on lock files, and that is vulerable if programs can be closed irregularly (crash, reboot, power loss). There is little you can do to prevent that. Make sure you close all tables (the main form' s OnCloseQuery event is the best place for that since it fires on user logoff. If possible rework your logic to use queries instead of ttable, so you do not have to keep the tables open all the time.  If feasable migrate to a proper database server. The BDE is not even a  zombie anymore, it is a fossil, and a poorly preserved one at that...

No Data