dbrpwset

Description

Add a remote password to the LOGINREC structure.

Syntax

RETCODE dbrpwset(loginrec, srvname, password, pwlen)
 
LOGINREC     *loginrec;
char                 *srvname;
char                 *password;
int                      pwlen;

Parameters

loginrec

A pointer to a LOGINREC structure. This pointer will serve as an argument to dbopen. You can allocate a LOGINREC structure by calling dblogin.

srvname

The name of a server. A server’s name is stored in the srvname column of its sysservers system table. When the first server calls a stored procedure located on the server designated by srvname, it will use the specified password to log in. If srvname is NULL, the specified password will be considered a “universal” password, to be used with any server that does not have a password explicitly specified for it.

password

The password that the first server will use to log in to the specified server.

pwlen

The length of the password in bytes.

Returns

SUCCEED or FAIL.

This routine may fail if the addition of the specified password would overflow the LOGINREC’s remote password buffer. (The remote password buffer is 255 bytes long. Each password’s entry in the buffer consists of the password itself, the associated server name, and 2 extra bytes.)

Usage

See also

dblogin, dbopen, dbrpwclr, DBSETLAPP, DBSETLHOST, DBSETLPWD, DBSETLUSER