Solved

Multi-User networked DB

Posted on 1997-06-04
6
221 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

624 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