home *** CD-ROM | disk | FTP | other *** search
- .Na "dbrpwset"
- .mc |
- .Aa
- .Fu
- Add a remote password to the LOGINREC structure.
- .Ih "remote procedure call"
- .Ih "stored procedure, calling"
- .Ih "call, remote procedure"
- .Ih "password, remote"
- .Ih "remote password"
- .Sy
- .Sf "RETCODE dbrpwset(loginrec, srvname, password, pwlen)"
- .Sp "LOGINREC" "*loginrec"
- .Sp "char" "*srvname"
- .Sp "char" "*password"
- .Sp "int" "pwlen"
- .Co
- .Bl
- A \*N command batch or stored procedure running
- on one \*S may call a stored procedure located on
- another \*S.
- To accomplish this server-to-server communication,
- the first \*S,
- connected to the application through \f2dbopen()\f1,
- actually logs into the second, remote \*S, and performs
- a remote procedure call.
- .sp 0.5v
- \f2dbrpwset()\f1 allows the application to specify
- the password to be used when the first \*S
- attempts to call the stored procedure on the remote \*S.
- Multiple passwords may be specified, one for each
- \*S that the first \*S might need to log into.
- .Bl
- If the application has not specified a remote password for a particular \*S,
- the password defaults to the one set with \f2DBSETLPWD()\f1 (or a null value,
- if \f2DBSETLPWD()\f1 has not been called).
- This behavior may be fine if the application's user has the same password on multiple \*Ss.
- .Bl
- \f2dbrpwclr()\f1 clears all remote passwords from the LOGINREC.
- .Bz
- .Pa
- .Pi loginrec
- A pointer to a LOGINREC structure. This pointer will serve as
- an argument to
- .I "dbopen()."
- You can get one by calling
- .I "dblogin()."
- .Pi srvname
- The name of a server.
- A server's name is
- stored in the \f2srvname\f1 column of its \f2sysservers\f1 system table.
- When the first server calls a stored procedure
- located on the server designated by \f2srvname\f1, it will use the specified password
- to log in.
- If \f2srvname\f1 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.
- .Pi password
- The password which the first \*S will use to log into the specified \*S.
- .Pi pwlen
- The length of the password in bytes.
- .in -.375i
- .Re
- .br
- 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 two extra bytes.)
- .Sa
- dblogin,
- dbopen,
- dbrpwclr,
- DBSETLAPP,
- DBSETLHOST,
- DBSETLPWD,
- DBSETLUSER
- .mc
-