home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbsetlhost.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  1.2 KB  |  57 lines

  1. .Na "DBSETLHOST" 
  2. .Aa
  3. .Fu
  4. Set the host name in the LOGINREC structure.
  5. .Ih "LOGINREC, setting the host name in"
  6. .Ih "host name, setting"
  7. .Sy
  8. .Sf "RETCODE DBSETLHOST(loginrec, hostname)"
  9. .Sp "LOGINREC" "*loginrec"
  10. .Sp "char" "*hostname"
  11. .Co
  12. .Bl
  13. This macro sets the host name in the 
  14. LOGINREC
  15. structure.  
  16. For it to have any effect, it must be called before
  17. .I "dbopen()."
  18. .Bl
  19. The host name will show up in the 
  20. .I sysprocesses
  21. table in the
  22. .I master
  23. database.
  24. .Bl
  25. It is not necessary to call this routine.
  26. If it is not called,
  27. \*L will set the default value for 
  28. the host name.
  29. This default value will generally be a
  30. version of the host machine's name provided by the operating system.
  31. .Bl
  32. \f3Note for Macintosh programmers:\f1  By default, the host name
  33. is set to the \f2username\f1 field in the \f2Chooser\f1 Desk Accessory.
  34. .Bz
  35. .Pa
  36. .Pi loginrec
  37. A pointer to a LOGINREC structure, which will be passed as
  38. an argument to 
  39. .I "dbopen()."
  40. You can get one by calling
  41. .I "dblogin()."
  42. .Pi hostname
  43. The host name that will be sent to \*S.  
  44. It must be a null-terminated character string.
  45. The maximum length of the string, not including the null terminator,
  46. is 30 characters.
  47. .in -.375i
  48. .Re
  49. .br
  50. SUCCEED or FAIL.
  51. .Sa
  52. dblogin,
  53. dbopen,
  54. DBSETLAPP,
  55. DBSETLPWD,
  56. DBSETLUSER
  57.