Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Paradox and Network

6 views
Skip to first unread message

Marc Pleysier

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
My Delphi 3 app use pdox files.
If pdox files aren't local but on another Win95/98 PC (peer to peer
network), full file server disk must be shared with full access.
If not (just data directory is shared with full access), only one client can
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).

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


Edwin Leeper

unread,
Jan 14, 1999, 3:00:00 AM1/14/99
to
I think that your main problem is just a configuration error.

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---


Marc Pleysier

unread,
Jan 18, 1999, 3:00:00 AM1/18/99
to

Edwin Leeper wrote in message <77lqrb$20...@news-sol.swissonline.ch>...

>I think that your main problem is just a configuration error.
>
>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....

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

Dell Stinnett

unread,
Jan 18, 1999, 3:00:00 AM1/18/99
to
Marc,
The BDE initializes with the net dir in it's settings BEFORE your
application gets to the line where it actually sets the net dir. This
is what is causing your problem. If you set the net dir in the BDE
configuration, the problem will no longer exist.

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

Marc Pleysier

unread,
Jan 21, 1999, 3:00:00 AM1/21/99
to
>The BDE initializes with the net dir in it's settings BEFORE your
>application gets to the line where it actually sets the net dir. This
>is what is causing your problem. If you set the net dir in the BDE
>configuration, the problem will no longer exist.


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


Dell Stinnett

unread,
Jan 28, 1999, 3:00:00 AM1/28/99
to
Do you have any 'Initialization' procedures in any of the units? One
of the things that I've found is that the Initialization procedures
run the the app starts, NOT when the unit starts. Thus, if any of
your initialization procedures access a table then the BDE is
initialized before you can set the netdir.

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

Marc Pleysier

unread,
Feb 2, 1999, 3:00:00 AM2/2/99
to
>Do you have any 'Initialization' procedures in any of the units? One
>of the things that I've found is that the Initialization procedures
>run the the app starts, NOT when the unit starts. Thus, if any of
>your initialization procedures access a table then the BDE is
>initialized before you can set the netdir.

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


0 new messages