Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Sharing a Database

Posted on 1999-07-21
Medium Priority
Last Modified: 2010-04-04
I'm attempting to write a small application that will read and write to paradox tables.  2 instances of this program will be running on 2 separate computers that are networked, the first instance will want to write to data on c:\data and the next instance will want to write to the same data but it'll be e:\data  I can get the applications to read the data but when I append a record, the 2nd application doesn't see it until I close the app down and re-run it.  I'm obviously missing something, so If someone could help me out I'd appreciate it.


Question by:Dazza051197
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 27

Expert Comment

ID: 1390130
hmm Dazza,

don't think it is solveable by this parameters,
because for both instances the tables should stay
in the exact same dir-entry of the alias,
not c:\data for one and e:\data for the other

also only one .Net file must be used by both instances


Expert Comment

ID: 1390131
It doesn't see the data cause you are not refreshing the datasource. I would handle this by putting a ttimer component down on application 2 and every timeinterval run a refresh.

Query.Open; or Table.Open

or simply use the RequestLive property on TQuery.


Author Comment

ID: 1390132
This still doesn't show the newly added/edited records a nd it also lets me edit the same record on both systems.
Can someone provide me with example code, and I'll up the points..

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 27

Expert Comment

ID: 1390133
hi Dazza,

i don't think that's a problem of your app, its a problem of the configuration of paradox. the entrys of the bde-alias must be in sync by both clients, that means char by char.


Author Comment

ID: 1390134
Thanks Kretzschmar, you pointed me along the right paths, literally.  I need to use UNC paths for the data and netdir, as it's C:\ on one and E:\ on the rest, If I use UNC then they are the same, ie. \\Machine1\C\Data then everything is OK, I also had to set Lcoal Share to true within BDE but I can live with that.

Please answer so I can give you the points.

LVL 27

Accepted Solution

kretzschmar earned 200 total points
ID: 1390135
well Dazza,

glad that this helped you,
good luck again

meikl ;-)

Expert Comment

ID: 1390136
Hi Dazza,

I had this same problem.

Try this.

1) Make sure you have the same version BDE installed on each machine.

2) On the BDE Configuration tab double click Drivers, then double click
Click on PARADOX the defination tab will appear.
Make sure the NET DIR property is set to aim at your database folder
example: c:\Program Files\Crystal\Data the drive letter will
change on the guest machines example E:\Program Files\Crystal\Data.

3) On the BDE Configuration tab double click SYSTEM then INIT.
In the definition tab.
Default Driver should read PARADOX.
Local Share should be set TRUE.
These settings should be the same on each machine, don't forgat to save
the changes.

You will need to reboot the machines for these changes to take affect.

4) Drop a TSESSION component on your form,
Object Inspector Properties should be as follows.
Active False
AutoSessionName True
KeepConnection True
Name Session1
NetFileDir Blank (In other words nothing in it)
PrivateDir Blank
SessionName should set itself example: session1_1
SQLHourGlass True
Tag 0.

I also use a TDatabase.

In the MainForm Oncreate I have the following Code.

procedure TCrystalForm.FormCreate(Sender: TObject);
DBPath: string;
ParamList: TStringList;
{get the actual location of the database from the alias}
ParamList := TStringList.Create;
Session.GetAliasParams(DataBase.AliasName, ParamList);
DBPath := ParamList.Values['PATH'];
Session1.NetFileDir := (DBPath) ;
Session1.PrivateDir := 'C:\TEMP';
DatePicker.Date := (Now);
Database.Connected := True;



Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question