Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> usraccountbalanceget() / usraccountbalanceset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UsrAccountBalanceGet() / UsrAccountBalanceSet()
------------------------------------------------------------------------------
 Purpose:
 Get or set the user account balance.

 Syntax:
 lResult = UsrAccountBalanceGet(lpszUserName)
 lResult = UsrAccountBalanceSet(lpszUserName, lBalance)

 Parameters:
 lpszUserName The name of the user.
 lBalance     The new balance.

 Returns:
 A numeric value (signed long int).

 The CA-Clipper names for these functions are:
 UsrAccBalGet() / UsrAccBalSet()

 Description:
 UsrAccountBalanceGet() returns the account balance of a specified user
 lpszUserName on the current file server.

 UsrAccountBalanceSet() sets the account balance of the specified user
 lpszUserName to the specified value lBalance and returns the previous
 balance.

 Any charges made by the file server or other accounting servers, such as
 print servers, are deducted from this amount.

 Returns a numeric value, or NOVERRLONG if an error occurs.

 Example:
 // To test user KATIE's account balance and change it to 1000
 // if it is below 10:
 lBalance = UsrAccountBalanceGet( "KATIE" )
 if ( NWErrorGet() = 0 )
    if( lBalance < 10 )
       UsrAccountBalanceSet( "KATIE", 1000 )
    endif
 endif

 Notes:
 To set a user's account balance requires Supervisor equivalence.

See Also: UsrAccountLimitGet() / UsrAccountLimitSet() UsrAccountReserveGet()

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