D Eloquence Library
The LOGON Function
The DBLOGON is used to provide authorization information which is used when connecting the database server.
The syntax is as follows:
int cc = idb_logon(user, passwd)
char *user;
void *passwd;
The parameters are:
- user
- A pointer to a character array which specifies the user id which should be used to authorize database access. The user id must be terminated with a '\0' character. When a NULL pointer or an empty user id is passed, the server will default to the user name "default".
- passwd
- A pointer to a character array containing the password for the user id. The password must be terminated with a '\0' character. When a NULL pointer or an empty password is passed, the server will assume no password.
- The authorization information is transmitted to a server when a database is opened. This has no effect when used with the eloqdb5 server.
Description
The idb_logon function call is used to provide authorization data which are transmitted to the data base server, when a data base is openend. For Eloquence A.05.xx data bases (accessed through the eloqdb5 server), the logon information is ignored.
Return value
Returns 0 if successful, or -1 if an error was encountered.
Example
char *user = "mike";
char *pswd = "secret";
if(log_on(user, pswd)) {
printf("unable to save authorization information");
exit(1);
}
Eloquence Database Manual - 19 DEC 2002