home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 for Intel / NeXTSTEP 3.2 for Intel.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbrpwset.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  2.4 KB  |  81 lines

  1. .Na "dbrpwset" 
  2. .mc |
  3. .Aa
  4. .Fu
  5. Add a remote password to the LOGINREC structure.
  6. .Ih "remote procedure call"
  7. .Ih "stored procedure, calling"
  8. .Ih "call, remote procedure"
  9. .Ih "password, remote"
  10. .Ih "remote password"
  11. .Sy
  12. .Sf "RETCODE dbrpwset(loginrec, srvname, password, pwlen)"
  13. .Sp "LOGINREC" "*loginrec"
  14. .Sp "char" "*srvname"
  15. .Sp "char" "*password"
  16. .Sp "int" "pwlen"
  17. .Co
  18. .Bl
  19. A \*N command batch or stored procedure running
  20. on one \*S may call a stored procedure located on
  21. another \*S.
  22. To accomplish this server-to-server communication,
  23. the first \*S,
  24. connected to the application through \f2dbopen()\f1, 
  25. actually logs into the second, remote \*S, and performs
  26. a remote procedure call.
  27. .sp 0.5v
  28. \f2dbrpwset()\f1 allows the application to specify
  29. the password to be used when the first \*S
  30. attempts to call the stored procedure on the remote \*S.
  31. Multiple passwords may be specified, one for each
  32. \*S that the first \*S might need to log into.
  33. .Bl
  34. If the application has not specified a remote password for a particular \*S,
  35. the password defaults to the one set with \f2DBSETLPWD()\f1 (or a null value,
  36. if \f2DBSETLPWD()\f1 has not been called).
  37. This behavior may be fine if the application's user has the same password on multiple \*Ss.
  38. .Bl
  39. \f2dbrpwclr()\f1 clears all remote passwords from the LOGINREC.
  40. .Bz
  41. .Pa
  42. .Pi loginrec
  43. A pointer to a LOGINREC structure.  This pointer will serve as
  44. an argument to 
  45. .I "dbopen()."
  46. You can get one by calling
  47. .I "dblogin()."
  48. .Pi srvname
  49. The name of a server.
  50. A server's name is
  51. stored in the \f2srvname\f1 column of its \f2sysservers\f1 system table.
  52. When the first server calls a stored procedure
  53. located on the server designated by \f2srvname\f1, it will use the specified password
  54. to log in.
  55. If \f2srvname\f1 is NULL,
  56. the specified password will be considered a ``universal'' password,
  57. to be used with any server that does not have a password explicitly
  58. specified for it.
  59. .Pi password
  60. The password which the first \*S will use to log into the specified \*S.
  61. .Pi pwlen
  62. The length of the password in bytes.
  63. .in -.375i
  64. .Re
  65. .br
  66. SUCCEED or FAIL.
  67. This routine may fail if the addition of the specified password
  68. would overflow the LOGINREC's remote password buffer.
  69. (The remote password buffer is 255 bytes long.
  70. Each password's entry in the buffer consists of
  71. the password itself, the associated server name, and two extra bytes.)
  72. .Sa
  73. dblogin, 
  74. dbopen, 
  75. dbrpwclr, 
  76. DBSETLAPP, 
  77. DBSETLHOST, 
  78. DBSETLPWD, 
  79. DBSETLUSER
  80. .mc
  81.