community.borland.com

Article #15247: BDE setup for Peer-To-Peer(Non-Dedicated) Networks

 Technical Information Database

TI247B.txt   BDE setup for Peer-To-Peer(Non-Dedicated) Networks
Category   :General Programming
Platform    :All
Product    :BDE  3.0

Description:
Using a BDE32 Application on a Peer-To-Peer Network
---------------------------------------------------


A Peer-To-Peer network (a network where each machine acts 
as a client and a server) can be one of the following, 
including other network platforms that are compatible 
with these:
1)  Windows 95
2)  Windows NT
3)  Lantastic
4)  Netware Lite

The BDE automatically detects when tables reside on a 
network drive, but it cannot detect whether the tables 
are on a dedicated server or a server/client.  Dedicated 
servers notify client applications that a file has been 
modified or locked.  This functionality is not present in 
Peer-To-Peer (non-dedicated) networks.  To achieve this 
functionality with Peer-To-Peer networks set "LOCAL 
SHARE" to TRUE in the BDE Configuration Utility on the 
System page.  This must be done on all BDE clients that 
access the tables on networks listed above.  This is not 
necessary for Novell File Server type networks.

If the tables that are being used are Paradox, there must 
also be a directory used for network control.  This 
directory must also reside on the network for all client 
applications to use.  It is good practice to have a 
separate directory for the application, network, and 
tables.  The following is an example:

(Shared Directory)
        |
        |--- (Tables Directory)
        |--- (EXE Directory)
        |--- (Network Directory)

There are two different BDE environments that must also 
be considered:
1)  Using only BDE 32Bit applications.
2)  Using BDE 32Bit applications along with BDE 16Bit 
    applications.


Setup for 32Bit Only Applications
---------------------------------

The 32Bit BDE fully supports the UNC naming convention 
along with long file names. It is recommended that the 
UNC convention is used for all BDE network connections.  
UNC removes the need for mapped drives.  This will allow 
access to the tables and network directory without the 
user being mapped to the drive.  UNC has the following 
syntax:
  \\(server name)\(share name)\(path)+(file name)

Here is a simple example of a standard BDE alias using 
UNC:

Alias: MyUNCAlias
     Type: STANDARD
     Path: \\FooServer\FooShare\Sharedir\Tables
     Default Driver: Paradox

The network directory can be setup in the same fashion:
Drivers: Paradox
     Net Dir: \\FooServer\FooShare\Sharedir\NetDir

The network directory can be set at runtime using 
session.netfiledir (Delphi) or DbiSetProp (C++ / Delphi)

If for some reason UNC cannot be used with the 32Bit 
application, follow directions for using BDE 32Bit and 
16Bit applications.


Setup for 16Bit and 32Bit BDE Applications
------------------------------------------

Since the 16Bit Windows API does not support UNC, neither 
does the 16Bit BDE.  To allow applications to share the 
tables, all clients must be mapped to the same directory 
on the server.  If the server is also used as a client, 
all other clients must be mapped to the root of the 
drive.  Drive letters from client to client do not have 
to be identical. Here are some examples of what will and 
will not work:

Client1: 
    Path: X:\ShareDir\Tables
Client2: 
    Path: X:\ShareDir\Tables
  This is OK

Client1: (Also the machine with the tables):
    Path: C:\ShareDir\Tables
Client2:
    Path: X:\ShareDir\Tables
  This is OK

Client1: (Also the machine with the tables):
    Path: C:\ShareDir\Tables
Client2:
    Path: X:\ShareDir\Tables
Client3:
    Path: R:\ShareDir\Tables
This is OK

Client1: 
    Path: X:\ShareDir\Tables 
Client2: 
    Path: X:\Tables (Where X:\Tables is actually 
X:\ShareDir\Tables, but shared on the ShareDir directory)
  This will not work.  The BDE must be able to make the 
same entry into the Network Control file.


In Summary (setup for Peer-To-Peer networks):
---------------------------------------------
16 and / or 32Bit Applications:
1)  Turn "LOCAL SHARE" to TRUE in the BDE Configuration 
    Utility.
2)  Do not use the UNC naming convention.
3)  Do not use tables with long file names.
4)  Make sure that all clients are mapped to the same 
    directory on the server.

32Bit Only Applications:
1)  Turn "LOCAL SHARE" to TRUE in the BDE Configuration 
    Utility
2)  Use the UNC naming convention to achieve a path to the 
    network directory and table directory.

If the above steps are not followed, users could be 
locked out of the tables getting error:
"Directory is controlled by other .NET file."
"File: (Path1) PDOXUSRS.LCK"
"Directory: (Path2)"
    OR
"Multiple .NET files in use."
"File: (Path) PDOXUSRS.LCK"

Reference:


7/15/98 3:24:23 PM
 

Last Modified: 01-SEP-99