[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FN_ATTCHFS()
 Attach to file server
------------------------------------------------------------------------------
 Syntax
 
       fn_attchFS( <cFileServerName> ) -> lSuccess
 
 Arguments

      <cFileServerName> is the file server to attach to

 Returns

      A logical indicating whether this workstation successfully attached
      to the designated file server.

 Description

      This function allows the workstation to attach to a designated file
      server.  A workstation may be attached to up to 8 file servers.  To
      use this function, the workstation must already be attached to at
      least one file server.

      Check fn_Error() upon return for any information regarding why
      an attempt to attach failed.  Also, if you attempted to attach to
      a server to which you were already attached, fn_attchFS() will return
      TRUE, indicating that you are still attached, however will set the
      error value returned by fn_Error() to EALREADY_ATTACHED.

      Please note that fn_attchFS() simply attaches you to a file server.
      To log in to that server, you must make it the preferred server,
      then login with a name and password.

 Examples

      IF !fn_attchFS( "SALES" )          // attach to server
         <... unable to attach ...>
      ELSE

         aFSNameTable := fn_FSName()     // get list of attached servers
                                         //  to find ConnectionID

         nConnID := ASCAN( aFSNameTable, {|e| e == "SALES" })

         fn_SPFCID( nConnID )            // set preferred server
                                         //  and log in to it

         fn_loginFS( "SLARSEN", OT_USER, "dork" )

      ENDIF


 Source: N:\SRC\CONNWS\ATTACH.PRG

 Author: Steve Larsen

See Also: fn_detchFS() fn_connID() fn_connINF() fn_loginFS() fn_SPFCID() fn_FSName()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson