?
Solved

Borland BDE & NetDir

Posted on 1997-03-26
4
Medium Priority
?
478 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
[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 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 200 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

765 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