Subject Re: Network()
From Andy Taylor <andy.taylor@which.net>
Date Thu, 19 Apr 2018 15:23:59 -0400
Newsgroups dbase.getting-started

Heather,

Unfortunately although it is possible to define a function such as:
function Network
   return False
dBASE will ignore that function in favour of the built-in function.

The fudge that would work is:
#define network() true
However that requires recompiling of the relevant programs which you need to avoid. :-(

Andy
  
> We are trying out dbDOS PRO 6 with our dBase IV applications.
>
> Our dBase programs are on a network drive mapped to a drive letter.  These are working OK.  
>
> Many of them have a user table that grants different permissions according to the current user.  
>
> The dbDOS PRO 6 tech support people showed me how to get the current user, but our original developer had code that looks like this:
>
> IF NETWORK()
>               PC_ID = GETENV("USERNAME")
> ELSE
>               PC_ID = "NOTNET"
> ENDIF
>
> The function NETWORK() is returning False rather than True in the dbDOS PRO 6 environment.  Is there a way to fudge this to be TRUE?
>
> In a normal situation, I would change the code and recompile.  But I am not a dBase person and I dread trying to track down all the prg files to compile into a DBO file.  (The original programmers would compile many prgs into one DBO sometimes, left unused prgs sitting around, and no documentation, and then retired!)
>
> Thank you!
>