home *** CD-ROM | disk | FTP | other *** search
- .Na "dblogin"
- .Aa
- .Fu
- Allocate a login record for use in \f2dbopen()\f1.
- .Ih "LOGINREC, allocating"
- .Sy
- .Sf "LOGINREC *dblogin()"
- .Co
- .Bl
- This routine allocates a LOGINREC structure for use with
- .I "dbopen()".
- .Bl
- There are various routines available to supply components of the LOGINREC.
- The program may supply the host name, user name,
- user password, and application name\(emvia \f2DBSETLHOST()\f1, \f2DBSETLUSER()\f1,
- \f2DBSETLPWD()\f1, and \f2DBSETLAPP()\f1, respectively. It is generally only necessary
- for the program to supply the user password (and even this can be eliminated
- if the password is a null value). The other variables in the
- LOGINREC structure will be set to default values.
- .Bl
- Here's a program fragment that uses \f2dblogin()\fP:
- .ta +4n +4n +4n +4n +4n +4n
- .SD
- .ne 7
- .so dblogin.ex
- .ED
- .Bl
- Once the application has made all its \f2dbopen()\f1 calls,
- the LOGINREC structure is no longer necessary.
- The program can then call \f2dbloginfree()\f1 to free
- the LOGINREC structure.
- .Bz
- .Re
- .br
- A pointer to a LOGINREC structure.
- \f2dblogin()\f1 returns NULL if the
- structure could not be allocated.
- .Sa
- dbloginfree,
- dbopen,
- dbrpwclr,
- dbrpwset,
- DBSETLAPP,
- DBSETLHOST,
- DBSETLPWD,
- DBSETLUSER
-