Solved

Borland BDE & NetDir

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Print Graphic and Text to Epson TM-T88v 12 259
SUM 2 INTEGER ARRAYS INTO 1 10 100
PHP preg_replace code convert to Delphi 14 57
Sending files from  idTcpServer Socket to idTcpClient 2 40
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

778 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