Board index » delphi » BDE Paradox NET DIR Setting unusual result

BDE Paradox NET DIR Setting unusual result

Set the NET DIR entry on both PCs to the UNC location of the paradox.net
file.

"Paul Norman" <106121....@compuserve.com> schreef in bericht
news:963498093.241335@shelley.paradise.net.nz...

Quote
> Dear all,

> I need a little help please.

> I have two Delphi 3.0  progs( 1 & 2)  running on a machine (1)  peer to
peer
> Win9X networked to one other machine (2). (Machine 2's only role is to
have
> a required Paradox DB used by Prog 1, and also the Paradox.net file on the
> root of its c:\)

> Prog 1 on machine 1 uses a database set on the other machine (2). So I
have
> run BDE and placed a paradox network file on the network drive on machine
2.
> Things work well.

> However if  machine 2 is not connected, prog number 2 running on machine 1
> (which has no need to access the absent machine 2) can not obtain access
to
> its own Paradox table stored on its own local machine 1. An error message
> notes that the network is not present.

> What do I do in BDE 4.x to get it to allow both network access from
machine
> 1 for Prog 1, and local access for machine 1 and Prog 2?

> Please email me directly as well 106121....@compuserve.com

> Paul

 

Re:BDE Paradox NET DIR Setting unusual result


On Thu, 13 Jul 2000 16:55:31 +0200, "M.H. Avegaart"

Quote
<avega...@NOSPAMmccomm.nl> wrote:
>Set the NET DIR entry on both PCs to the UNC location of the paradox.net
>file.

Also, the netfile should not be in the root directory of any drive;
always put it in a subdirectory: C:\netfile\ or whatever.

Dan

Quote

>"Paul Norman" <106121....@compuserve.com> schreef in bericht
>news:963498093.241335@shelley.paradise.net.nz...
>> Dear all,

>> I need a little help please.

>> I have two Delphi 3.0  progs( 1 & 2)  running on a machine (1)  peer to
>peer
>> Win9X networked to one other machine (2). (Machine 2's only role is to
>have
>> a required Paradox DB used by Prog 1, and also the Paradox.net file on the
>> root of its c:\)

>> Prog 1 on machine 1 uses a database set on the other machine (2). So I
>have
>> run BDE and placed a paradox network file on the network drive on machine
>2.
>> Things work well.

>> However if  machine 2 is not connected, prog number 2 running on machine 1
>> (which has no need to access the absent machine 2) can not obtain access
>to
>> its own Paradox table stored on its own local machine 1. An error message
>> notes that the network is not present.

>> What do I do in BDE 4.x to get it to allow both network access from
>machine
>> 1 for Prog 1, and local access for machine 1 and Prog 2?

>> Please email me directly as well 106121....@compuserve.com

>> Paul

--
Dan Brennand
CMDC systems, inc.
Configuration Management and Document Control: Consulting, Software,
and the only comprehesive textbook on this subject.
visit us at www.cmdcsystems.com
[Remove the SPAM from my e-mail address]

Re:BDE Paradox NET DIR Setting unusual result


Quote
"Paul Norman" <106121....@compuserve.com> wrote in message

news:963498093.241335@shelley.paradise.net.nz...

Quote
> Dear all,

> I need a little help please.

> I have two Delphi 3.0  progs( 1 & 2)  running on a machine (1)  peer to
peer
> Win9X networked to one other machine (2). (Machine 2's only role is to
have
> a required Paradox DB used by Prog 1, and also the Paradox.net file on the
> root of its c:\)

> Prog 1 on machine 1 uses a database set on the other machine (2). So I
have
> run BDE and placed a paradox network file on the network drive on machine
2.
> Things work well.

> However if  machine 2 is not connected, prog number 2 running on machine 1
> (which has no need to access the absent machine 2) can not obtain access
to
> its own Paradox table stored on its own local machine 1. An error message
> notes that the network is not present.

> What do I do in BDE 4.x to get it to allow both network access from
machine
> 1 for Prog 1, and local access for machine 1 and Prog 2?

1. Change machine 1's BDE NetFileDir to a local drive.
2. If Prog 1 is using the default database and session components, then add
tDatabase and tSession components to it and connect all your tables to them.
(You can create a data module for them or add them to your main form.)
3. Make sure that the database's Connected and session's Active properties
are false before compiling the application.
4. In the session's OnStartup event or in the databases OnLogin (I believe
that either will work - or you can do it in the container's OnCreate event
{provided that the container (i.e. form) has no open tables when it is
compiled}), have code to check and see if Machine 2 is available - try a
FileExists for a file that should be there. If the machine is available set
the session's NetFileDir to the correct location. If it isn't, raise an
exception.

Also, I'd suggest that you upgrade to BDE 5.x, its available as a free
download from the Borland site. If there are programs on machine 2 that also
access the db on it, you should be using UNC paths (e.g.
\\StationName\ShareName\Directories\FileName for specifying the NetFileDir).

Re:BDE Paradox NET DIR Setting unusual result


Thanks for all the advice, will put the necessary points into action.

Paul

Other Threads