Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>net_use()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
NET_USE()

    NET_USE() will open a specified database in either exclusive or
    shared mode, along with up to eight corresponding index files. The
    syntax is:

    NET_USE(<filename>, <excl_use> [,<index1>,<index2>,...<index8>]

    Required Parameters

    <filename> is a character string representing the name of the
    database file to be opened.

    By default, the alias for this database will carry the same name as
    the database.  If you wish to open the database under a different
    alias, pass "ALIAS <alias>" as part of the filename.  See below for
    an example of this syntax.

    <excl_use> is a logical expression representing the desired mode:
    True (.T.) for exclusive, False (.F.) for shared.

    Optional Parameters

    <index1>...<index8> are character strings representing the names of
    the index files to be opened.

    Return Value

    NET_USE() returns a logical value: True (.T.) if the file was opened
    successfully, or False (.F.) if it was not.

    If NET_USE() is unable to open the file, the user will be asked if
    they wish to wait for it to become available.  If not, the return
    value will be False.  If they do decide to wait, they will be
    entertained by an intriguing screen display.  They may abort the
    wait at any time by pressing Esc (which will then cause the function
    to return False).

    This function also provides aural feedback to the user, so that if
    they want to wait for the file, they do not necessarily have to
    remain glued to the screen.  When the file becomes available, the
    Charge theme will be played, which is sure to get a Pavlovian
    response from your users!

    You will note the absence of explicit selection of work areas.
    NET_USE() takes advantage of the Clipper "SELECT 0" command to
    automatically select the next available work area.

    WARNING: You must SET EXCLUSIVE OFF prior to calling this function.
    If you do not, NET_USE() will attempt to open all files exclusively,
    which will give you a terrible headache.

    Sample Usage

    IF ! NET_USE('customer',.F.,'cust1','cust2')                        
       RETURN                                                           
    ENDIF                                                               
    ** code to maintain customer file                                   
    |                                                                   
    |                                                                   
    IF ! NET_USE('customer alias cust',.T.,'cust1') && use CUST as alias
       RETURN                                                           
    ENDIF                                                               
    ** code to print customer reports                                   

See Also: ADD_REC() FILELOCK() REC_LOCK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson