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

  1. .Na "DBSETLUSER" 
  2. .Aa
  3. .Fu
  4. Set the username in the LOGINREC structure.
  5. .Ih "LOGINREC, setting the username in"
  6. .Ih "username, setting"
  7. .Sy
  8. .Sf "RETCODE DBSETLUSER(loginrec, username)"
  9. .Sp "LOGINREC" "*loginrec"
  10. .Sp "char" "*username"
  11. .Co
  12. .Bl
  13. This macro sets the username in the 
  14. LOGINREC
  15. structure. 
  16. For it to have any effect, it must be called before
  17. .I "dbopen()."
  18. .Bl
  19. In most environments, this macro is optional.
  20. If it is not called,
  21. \*L will generally set the default value for 
  22. the username.
  23. .sp 0.5v
  24. \f3Note for VMS programmers:\f1  On VMS the username defaults to the
  25. USER logical name.
  26. .sp 0.5v
  27. \f3Note for UNIX programmers:\f1  On UNIX the username defaults
  28. to the UNIX login name.
  29. .sp 0.5v
  30. \f3Note for MS-DOS and OS/2 programmers:\f1  On MS-DOS and OS/2 the
  31. username defaults to the SYBUSER environment variable, if any.
  32. If the application does not call
  33. \f2DBSETLUSER()\f1, the SYBUSER environment variable must be set.
  34. Otherwise, \f2dbopen()\f1 will fail
  35. when it tries to log into the \*S.
  36. .sp 0.5v
  37. \f3Note for Macintosh programmers:\f1  On the Macintosh there is no default username.
  38. Therefore, the application must call \f2DBSETLUSER()\f1.
  39. If it does not, \f2dbopen()\f1 will fail when it tries to log into the \*S.
  40. .Bz
  41. .Pa
  42. .Pi loginrec
  43. A pointer to a LOGINREC structure, which will be passed as
  44. an argument to 
  45. .I "dbopen()."
  46. You can get one by calling
  47. .I "dblogin()."
  48. .Pi username
  49. The username that will be sent to \*S.
  50. It must be a null-terminated character string.
  51. The maximum length of the string, not including the null terminator,
  52. is 30 characters.
  53. \*S will use \f2username\f1 to determine who is attempting the connection.
  54. The \*S usernames are defined in the
  55. .I syslogins
  56. table in the 
  57. .I master 
  58. database.
  59. .in -.375i
  60. .Re
  61. .br
  62. SUCCEED or FAIL.
  63. .Sa
  64. dblogin,
  65. dbopen,
  66. DBSETLHOST,
  67. DBSETLPWD,
  68. DBSETLAPP
  69.