Solved

Borland BDE & NetDir

Posted on 1997-03-26
4
476 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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