SA_LOGON
Connects to FairCom DB in preparation for administration.
Short Name
SA_LOGON()
Type
System Administration
Declaration
NINT SA_LOGON(cpTEXT admnuid, cpTEXT admnpwd, cpTEXT filepwd, cpTEXT servername)
Description
The SA_LOGON() function is used to connect to FairCom DB and open the server’s administrative files. To use the SA_USERS(), SA_GROUP(), and SA_FILES() functions, a program must first call SA_LOGON().
Return
All server administration functions return a zero value to indicate success and a non-zero value (defined in cthelp.h) to indicate failure. In the case of failure, the global variable isam_err will be set to the FairCom DB error value. See c-tree Error Codes in the FairCom DB Programmer’s Reference Guide for a complete listing of error values.
Example
NINT rc;
TEXT auid[IDZ], apwd[PWZ], fpwd[PWZ], svrname[25];
if ((rc = SA_LOGON(auid, apwd, fpwd, svrname)) != 0)
printf("\nSA_LOGON error = %d", rc);
else {
DoAdmin();
SA_LOGOF();
}
See also
SA_GROUP(), SA_FILES(), SA_USERS(), SA_LOGOF()