Solved

Multi-User networked DB

Posted on 1997-06-04
6
217 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
  • 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 151
Process Javascript errors with Delphi TWebBrowser 1 178
I want to use librsync in my Delphi backup application. 3 59
DBCtrlGrid, Delphi, Scroll 7 26
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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 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