>BDE (Paradox 7 table) and network
>*2 paradox databases (db1, db2) located on the same computer
>*2 delphi3 applications (app1, app2) located on the client computers; the 2
>apps are accessing simultaneously the 2 database (app1->db1; app2->db1+db2)
>Problem :
>The first application is running, when the second one is started, the
>following message appears:
>"Répertoire occupé" (ie directory busy).
>If the 2 apps are running on different computer, no problem occurs.
This must mean that App2 is attempting to establish it's private
directory in the same as is used by App1. Look into specifying the
private dir of each app as it starts...
Ana Maria Gonzalez
Amherst MA
a...@soupinc.com
Are you setting either the private directory or the net directory in
code? If you're trying to point either one to different directories
in different apps, this error will occur (I also get it when I try to
set the private directory if my app has crashed and the BDE doesn't
clean up after itself. - I have to re-boot to clear it).
-Dell
_________________________________________________
Program: A magic spell cast over a computer
allowing it to turn one's input into error messages
Directory Is Busy
Possible Cause of Error
Two or more users may be linked to the same directory as their Private
Directory while using a shared executable that accesses Paradox tables.
Quick Fix
If multiple users are sharing the same executable that accesses Paradox
tables, each user should have his Private Directory explicitly set to a
directory of his own. This directory should be inaccessible to other users; it
can be either on his local hard drive or on the network if local hard drive
space is limited. For example, to have the program create a directory on the
user’s local hard drive, you could do this before the table’s are accessed:
var
Extension, ExecName, MineAllMine : String;
ExtensionPos: Integer;
. . .
ExecName := ExtractFileName(Application.ExeName);
Extension := ExtractFileExt(Application.ExeName);
ExtensionPos := Pos(Extension, ExecName);
Delete(ExecName,ExtensionPos,4);
MineAllMine := 'C:\Temp\' + ExecName;
if not DirectoryExists(MineAllMine) then
CreateDir(MineAllMine);
if DirectoryExists(MineAllMine) then
Session.PrivateDir := MineAllMine
else
raise Exception.Create('For some reason, the
private directory ' +
MineAllMine + ' was not
created. Beats the heck out
of me why not, though!');
end;
Additional Information
This is a nonissue if each user is running his own local copy of the
executable, as the Private Directory is implicitly set to the program’s "Start
In" directory. Unless you have changed it, this will be the directory in which
the executable resides.
Note: Do not set the PrivateDir setting to the root drive; alway specify a
subdirectory.
However, if multiple users are accessing the same program on a network (all
running a single executable on a shared network drive), they will each need to
have their Private Directory explicitly set to a different directory than the
others. Otherwise, all the temporary files will try to use the same directory
(the one in which the .exe resides), and their will be conflicts
(specifically, they will get the error message under discussion).
Clay Shannon,
author of the upcoming book "Troubleshooting Delphi - Quick Fixes"
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading