[Top] [Prev] [Next] [Bottom]
[Contents]
SaAddLoginRec
Sets or reads the login information for a database server.
#include "SaAddLogin.h"
int SaAddLoginRec(
int vendor,
char* server,
char* altserver,
char* uname,
char* passwd,
int overwrite);
Arguments
- vendor
- The vendor type of the database server to set/read the login information.
- server
- The name of the database server to set/read the login information.
- altserver
- The server name to use for all requests for server.
- uname
- The login name of the user on the database server.
- passwd
- The user's password on the server.
- overwrite
- Flag specifying how to affect the internal login information.
Return Values
Returns defined constants specified under Description.
SaAddLoginRec sets or reads the login information for a database server. Login information for all servers that a client uses is kept in a dynamic list of structures. There can be only one record per server in the list. Therefore, if a record already exists for a server, it must be specified whether to overwrite the old information or not. Also, an alternate server name may be specified so that all procedures which would have run under the normal server name will now run from the alternate server name. This is handy for re-mapping servers at run-time. The valid return values are listed below:
Use this function to bypass the default Login Manager of Sapphire/Web. The vendor type must be one of the following defined constants:
SGESYBASE (for Sybase)
SGEORACLE (for Oracle)
SGEINFORMIX (for Informix)
If you need to log into multiple databases, the following is an example of the syntax you would use:
SaAddLoginRec(SGESYBASE, "SYBSERVER","SYBSERVER", "sa", "clot",0);
- Note: For Oracle users, the server name must be "Oracle" and the database name is your Database Name, Alias, or Connection String.
See Also
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.