Solved

Borland BDE & NetDir

Posted on 1997-03-26
4
473 Views
Last Modified: 2012-05-04
I have 2 computers on a Windows '95 (peer to peer) network.

The paradox tables are stored on computer 1 and computer 2 accesses the data from this computer.
The NetDir on computer 1 points to 'C:\' and the NetDir on computer 2 points to 'T:\' which is a mapping of computer 1 'C:\'.

I have created an alias 'ARROW' pointing to this directory on both computers.

The problem is when I update a record on one computer I can't see the change until I exit out completely from the application I have written in Delphi and then come back in.
Also there is no record locking etc.

Regards
Eric Kay
0
Comment
Question by:Eric Kay
4 Comments
 
LVL 3

Expert Comment

by:sperling
ID: 1335004
You should always make sure that the mappings are equal seen from all machines.

Use
  Subst T: C:\
in autoexec.bat on one, map T: to C:\ on the other.

This is, in my opinion, a flaw in the design of Paradox, but I guess we'll have to live with it...


Regards,

Erik.
0
 

Author Comment

by:Eric Kay
ID: 1335005
Still doesn't work. I found that you need to set LOCAL SHARE to true on each computer on the Peer to Peer network.  The reason is that dedicated servers notify clients of record/file locking wheras on a Peer to Peer network this functionality is not present.
0
 

Accepted Solution

by:
gdj earned 100 total points
ID: 1335006
The easiest way to deal with multi-user that I have found.  It has the main advantage of ease of distribution.

Don't use an Alias.  for example you are storing the data on computer 1in the directory   C:\MYPROG\DATA

At runtime read an ini (or registry) location for these datafiles.  Also create a setup program to write the ini file.

var
  DataFiles : String

DataFiles := ReadFromINI {ie on computer 1 read in C:\MYPROG\DATA\    on computer 2 you read in T:\MYPROG\DATA\   }
Session.NetDir := DataFiles;
Table1.DatabaseName := Datafiles;
Table1.TableName := 'Customer.db"
try
  Table1.Active := True;
...


This creates the .net file in the data directory.  Because both computer already have to point to the same location for the data, you might alwell use the same location to point to the .net file.

Local Share MUST be set to true on all computers (BDE32CFG)

Paradox sharing only works if the program in written in the same version of Delphi.

If all else fails run the BDE on both computers.  If that works you know its a problem with your code, not the BDE configuration.
0
 
LVL 1

Expert Comment

by:jackb022197
ID: 1335007
I ran into similar problems: Make sure that the path for both NetDir's is identical (incl. drive letter).
These paths are stored in de *.net and/or *.lck files created by the BDE. If the paths are not identical, record locking will not work as it should.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 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…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

20 Experts available now in Live!

Get 1:1 Help Now