Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - ax_killuser() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_KillUser()
 Disconnects the specified user from the Advantage Database Server
------------------------------------------------------------------------------

Syntax

     AX_KillUser( <cUserName> | <nConnNumber> ) -> logical

     <cUserName>   User name.  The user name of an Advantage client is
                   the client computer name. Either cUserName or nConnNumber
                   must be specified.

     <nConnNumber> NetWare connection number.  Only applicable if running
                   against the Advantage Database Server for NetWare. Either
                   cUserName or nConnNumber must be specified.


Returns
     Returns a logical .T. if the operation was successful, else returns .F.
     If an error occurred, AX_Error() will return information on why the
     function failed.


Description

     AX_KillUser() will disconnect the specified Advantage user from the
     Advantage Database Server.  AX_KillUser() is a potentially dangerous
     operation and should be used with extreme caution.  AX_KillUser() will
     cause the specified user to be abnormally disconnected from the
     Advantage Database Server.  If the user is currently in the midst of an
     operation, that operation may not be able to run to completion.  If the
     specified user is currently in a transaction, that transaction will be
     rolled back before the user is disconnected.  All records locked by the
     specified user will be unlocked.  All files open by the specified user
     will be closed.  The specified user will then be disconnected.
     Unpredictable Advantage errors may be received by the Advantage
     application immediately after it has been "killed".

     If more that one Advantage client that is connected to the Advantage
     Database Server has the specified user name, they will all be
     disconnected from the Advantage Database Server.  That is, if two users
     named "BRAD" are connected to the Advantage Database Server, then a call
     to AX_KillUser( "BRAD" ) will disconnect both BRAD users.

     AX_KillUser() cannot be used to kill the current application's
     connection.

     Either cUserName must be specified with a user name or nConnNumber must
     be specified with a non-zero NetWare connection number.

Example

     // Must first get a connection to the Advantage Database Server
     USE x:dummy.dbf VIA "DBFCDXAX"

     // Kill user "Fred"
     ? lResult := AX_KillUser( "Fred" )  // Will return .t. if successful



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