Solved

Multi-User networked DB

Posted on 1997-06-04
6
213 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now