Example :
On file server, data are on C:\Data\Base
If disk C is shared, client connect to data via "\\File server\C\Data\base".
It work fine.
If disk C isn't shared and Data is shared, client connect to data via
"\\File server\base". Only one client can connect at the same time.
Clue : file Win386.swp on "\\File server\C\Windows" is modified when client
access to data.
Marcus
Start the BDE Administrator on each machine that should access the database.
Open the Configuration tab
Expand to \\Configuration\Drivers\Native\PARADOX
Check the NET DIR entry - default C:\ - obviously no good in a network :-)
All machines MUST point to the same directory so that they can share the
.NET file, etc....
Hope this helps.
Eddie
Marc Pleysier wrote in message <77kb87$a9k$1...@platane.wanadoo.fr>...
---SNIP---
>open pdox data at the same time. If a secondary client try to open a table,
>it have a NetDir error (Directory controlled by another .NET file).
---SNIP---
I set Session.NetFileDir:=<Database directory> in my app before opening a
table.
This make my app independent of the BDE param.
My problem is the impossibility to only share the database directory.
If NetFileDir param of all client wasn't the same, my app would never work.
When only the database directory is shared, when a second client connect to
a table it don't recognise the NetFile.
Marcus
I completely understand why you would want to set the net dir in code
- I've tried doing it myself. The problem is that, although it's
theoretically possible, it doesn't ever quite work. The problem is
even worse if you have more than one application accessing your data
(we have both our application AND Crystal Reports runtime which GPF's
if the net dir isn't set correctly) or if you have more than one BDE
application that access different files. The whole premise behind the
net dir is that all BDE/Paradox applications, regardless of which
tables they access, will use the exact same net dir.
IHTH!
-Dell
NO. I set the Session.NetFileDir before opening a table.
The error occurs when opening a Table, not when my app starts.
Anywhile, I've tryed to set manualy the NetDir in all BDE : same result.
I've got just 2 PC on my network, so one of then contain the data.
So they access data the same way : one through the network and the other
directly.
See this example :
- PC1 got data on it's drive D: (drive D isn't shared, D:\Data is shared)
- My app is launch on PC1
- PC2 try to access data via \\PC1\Data\ and got the error (this is a
traduction from french) :
Directory is controled by another .NET file :
Directory : D:\Data\
File : \\PC1\Data\Pdoxusrs.lck
The NetFile of PC2 is \\PC1\Data\ (D:\Data\ for PC1).
SO, PC AND PC2 GOT THE SAME NetFileDir.
Seem to be a bug...
My BDE is 4.5.
Marcus
Also, are you autocreating forms or creating them when they're needed?
If they're autocreated then the tables and such are created as the
application starts, which also initializes the BDE.
-Dell
_________________________________________________
Program: A magic spell cast over a computer
allowing it to turn one's input into error messages
I've got a MainForm witch don't use tables and the NetFileDir is set in the
FormShow.
>Also, are you autocreating forms or creating them when they're needed?
>If they're autocreated then the tables and such are created as the
>application starts, which also initializes the BDE.
Other forms (witch contain TTable) are created when user click on buttons of
the main form.
My NetFileDir initialization method works when hard disk which contain my
tables files is fully shared.
It doesn't when only the folder of my tables files is shared.
Marcus