Solved

Multi-User networked DB

Posted on 1997-06-04
6
218 Views
Last Modified: 2010-04-06
I have an app, using data modules for all tables, which needs multi-user acces to a networked database (Paradox).

I have set the Session.NetFileDir to a globally available directory (with full access privileges) in the initialization section of the first created datamodule.

Why does a Paradox.lck file appear in the database directory, in addition to the paradox.net file in the global access directory?

This means that I can run multiple instances on my computer, but no two computers can simultaneously use the software.

Any ideas?

Bryan
0
Comment
Question by:bcrotaz
[X]
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
  • 4
6 Comments
 

Expert Comment

by:gdj
ID: 1336817
There is a second variable in the TSession call PrivateDir setting this to, say the local TEMP dir will create the lck file locally.
0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1336818
I'll try it...
0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1336819
Nope.
Doesn't work.
It still puts the paradox.lck and pdoxusrs.lck files in the alias directory.

Here's the code I'm using to set the Session up:

initialization

  GetMem(TempPath,255);
  Session.NetFileDir:='g:\projects';
  GetTempPath(255,TempPath);
  Session.PrivateDir:=TempPath;
  FreeMem(TempPath,255);

end.

That happens in the first datamodule to be created.
The Create constructor for this datamodule is:

procedure TTapeData.TapeDataCreate(Sender: TObject);
var
  i: Integer;
begin
  for i:=0 to ComponentCount-1 do
    if Components[i] is TTable then
      (Components[i] as TTable).Open;
end;

This should only open the tables once the session is set up.

If I put a breakpoint in each datamodule at the start of the constructor code, the Session properties are correct.  ie. the initialization code is working.

HELLLLPPPPPP!!!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
jackb022197 earned 100 total points
ID: 1336820
Setting the netdir to be your data directory, works for me. Make sure that teh path to your tables is identical on both machines.
Hope this helps...
0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1336821
I'll try that.
I've been using another directory, but it's the same path on all machines.
0
 
LVL 1

Author Comment

by:bcrotaz
ID: 1336822
Actually you were both right....

I was using an old version of my installer by mistake.

20 lashes for me then!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…

738 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