Board index » delphi » How to move the PDOXUSRS.LCK file?

How to move the PDOXUSRS.LCK file?

A client machine is running a Delphi 2 application from a directory on
an NT server. The client machine has only read rights.
This app accesses PDOX tables on the client's local drive. The alias
is set to this directory. When the app starts up, it moans, because it
tries to write the PDOXUSRS.LCK file to the server's directory.

Is there any way of specifying that this file should go somewhere else?

The NETDIR parameter is set to the local drive.

Thanks
L.J. van Alphen
l...@ccii.co.za

 

Re:How to move the PDOXUSRS.LCK file?


Quote
L.J. van Alphen wrote:

> Is there any way of specifying that this file should go somewhere else?

The BDE Configuration Utility is the place, I think.

Aage J.

Re:How to move the PDOXUSRS.LCK file?


"L.J. van Alphen" <l...@ccii.co.za> wrote:

Quote
>A client machine is running a Delphi 2 application from a directory on
>an NT server. The client machine has only read rights.
>This app accesses PDOX tables on the client's local drive. The alias
>is set to this directory. When the app starts up, it moans, because it
>tries to write the PDOXUSRS.LCK file to the server's directory.
>Is there any way of specifying that this file should go somewhere else?
>The NETDIR parameter is set to the local drive.

What NETDIR parameter? Where? The TSession has a .NetDirectory
property that you can set (as long as BDE is not already running with
a different net dir).

Cheers

Re:How to move the PDOXUSRS.LCK file?


Quote
L.J. van Alphen wrote:

> A client machine is running a Delphi 2 application from a directory on
> an NT server. The client machine has only read rights.
> This app accesses PDOX tables on the client's local drive. The alias
> is set to this directory. When the app starts up, it moans, because it
> tries to write the PDOXUSRS.LCK file to the server's directory.

> Is there any way of specifying that this file should go somewhere else?

> The NETDIR parameter is set to the local drive.

> Thanks
> L.J. van Alphen
> l...@ccii.co.za

Hello L.J.,

try to add the following line to your project file (.dpr) before any of
your forms are created:

            Session.NetFileDir := 'LocalDrive:\LocalDirectory';

HTH

Thomas

--
Thomas Scheffczyk
----------------------------------------------------------------
email: scheffc...@verwaltung.uni-mainz.de
home : http://www.verwaltung.uni-mainz.de/Dez1/edv/folks/scheff/

Re:How to move the PDOXUSRS.LCK file?


1. I don't think you can move this file.  I think the BDE creates it in the
directory where the data is only  - the only (dangerous) solution is to
give Write rights for the directory to that client. I've heard some posts
about people trying to get paradox tables working on a CD-ROM, if it's
possible there may be some hope yet.

2. Ok it's not NETDIR but NetFileDir.

"NetFileDir: string; Description Run-time only. The NetFileDir property
specifies the directory that contains the BDE network control file,
PDOXUSRS.NET."

As you can see NetFileDir (also called NET DIR in the config utility) only
controls the location of the PDOXUSRS.NET file and not .LCK files.

If one wants to be pedantic, if you look up TSession you will find it's
properties are:
{D1:}
    property DatabaseCount: Integer read GetDatabaseCount;
    property Databases[Index: Integer]: TDatabase read GetDatabase;
    property Handle: HDBISES read GetHandle;
    property KeepConnections: Boolean read FKeepConnections write
FKeepConnections default True;
    property Locale: TLocale read FLocale;
    property NetFileDir: string read GetNetFileDir write SetNetFileDir;
    property PrivateDir: string read GetPrivateDir write SetPrivateDir;
    property OnPassword: TPasswordEvent read FOnPassword write FOnPassword;
//D2:
    property Active: Boolean read GetActive write SetActive default False;
    property KeepConnections: Boolean read FKeepConnections write
FKeepConnections default True;
    property NetFileDir: string read GetNetFileDir write SetNetFileDir;
    property PrivateDir: string read GetPrivateDir write SetPrivateDir;
    property SessionName: string read FSessionName write SetSessionName;
    property OnPassword: TPasswordEvent read FOnPassword write FOnPassword;
    property OnStartup: TNotifyEvent read FOnStartup write FOnStartup;

no "NetDirectory"  to be seen.
--
Paul Motyer
pa...@linuxserver.pccity.com.au
SoftStuff, Croydon, Vic,  Australia, 3136.

Richard C Haven <rha...@santacruz.com> wrote in article
<534np1$...@news.scruz.net>...

Quote
> "L.J. van Alphen" <l...@ccii.co.za> wrote:

> >A client machine is running a Delphi 2 application from a directory on
> >an NT server. The client machine has only read rights.
> >This app accesses PDOX tables on the client's local drive. The alias
> >is set to this directory. When the app starts up, it moans, because it
> >tries to write the PDOXUSRS.LCK file to the server's directory.

> >Is there any way of specifying that this file should go somewhere else?

> >The NETDIR parameter is set to the local drive.

> What NETDIR parameter? Where? The TSession has a .NetDirectory
> property that you can set (as long as BDE is not already running with
> a different net dir).

> Cheers

Re:How to move the PDOXUSRS.LCK file?


In article <534np1$...@news.scruz.net>,
   rha...@santacruz.com (Richard C Haven) wrote:

Quote
>"L.J. van Alphen" <l...@ccii.co.za> wrote:

>>A client machine is running a Delphi 2 application from a directory on
>>an NT server. The client machine has only read rights.
>>This app accesses PDOX tables on the client's local drive. The alias
>>is set to this directory. When the app starts up, it moans, because it
>>tries to write the PDOXUSRS.LCK file to the server's directory.

>>Is there any way of specifying that this file should go somewhere else?

>>The NETDIR parameter is set to the local drive.

>What NETDIR parameter? Where? The TSession has a .NetDirectory
>property that you can set (as long as BDE is not already running with
>a different net dir).

>Cheers

The short answer here is no.  There is no way to specify where the .lck files
will go.  They *always* go in the directory where the tables are.

The only option for a read-only directory is to place a directory lock into
the directory where the tables are which makes the tables read only for
everyone except the person who placed the dir lock.  The CDROM should have one
of these locks in the data directory for Delphi.

-Steve
Delphi QA
Borland International

Re:How to move the PDOXUSRS.LCK file?


Paul Motyer <pa...@linusserver.pccity.com.au> wrote in article
<01bbb417$439b0160$124c8...@paulm.pccity>...

Quote
> 1. I don't think you can move this file.  I think the BDE creates it in
the
> directory where the data is only  - the only (dangerous) solution is to
> give Write rights for the directory to that client. I've heard some posts
> about people trying to get paradox tables working on a CD-ROM, if it's
> possible there may be some hope yet.

Included is Borland's TI file describing the CD-ROM trick.

HTH
Peter
begin 600 READONLY.ZIP
<uuencoded_portion_removed>
I`````````%)%041/3DQ9+E185%!+!08``````0`!`#H```"T!@``````
`
end

Other Threads