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

  1. .Na "dblogin" 
  2. .Aa
  3. .Fu
  4. Allocate a login record for use in \f2dbopen()\f1.
  5. .Ih "LOGINREC, allocating"
  6. .Sy
  7. .Sf "LOGINREC *dblogin()"
  8. .Co
  9. .Bl
  10. This routine allocates a LOGINREC structure for use with
  11. .I "dbopen()".
  12. .Bl
  13. There are various routines available to supply components of the LOGINREC.
  14. The program may supply the host name, user name,
  15. user password, and application name\(emvia \f2DBSETLHOST()\f1, \f2DBSETLUSER()\f1,
  16. \f2DBSETLPWD()\f1, and \f2DBSETLAPP()\f1, respectively.  It is generally only necessary
  17. for the program to supply the user password (and even this can be eliminated
  18. if the password is a null value).  The other variables in the
  19. LOGINREC structure will be set to default values.
  20. .Bl
  21. Here's a program fragment that uses \f2dblogin()\fP:
  22. .ta +4n +4n +4n +4n +4n +4n
  23. .SD
  24. .ne 7
  25. .so dblogin.ex
  26. .ED
  27. .Bl
  28. Once the application has made all its \f2dbopen()\f1 calls,
  29. the LOGINREC structure is no longer necessary.
  30. The program can then call \f2dbloginfree()\f1 to free 
  31. the LOGINREC structure.
  32. .Bz
  33. .Re
  34. .br
  35. A pointer to a LOGINREC structure.  
  36. \f2dblogin()\f1 returns NULL if the
  37. structure could not be allocated.
  38. .Sa
  39. dbloginfree,
  40. dbopen,
  41. dbrpwclr,
  42. dbrpwset,
  43. DBSETLAPP,
  44. DBSETLHOST,
  45. DBSETLPWD,
  46. DBSETLUSER
  47.