Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Sybase DB Library C 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

  1                       Version 4.0 -- 5/1/89                  dblogin
  ______________________________________________________________________

  NAME:  dblogin

  FUNCTION:
       Allocate a login record for use in dbopen().

  SYNTAX:
       LOGINREC *dblogin()


  COMMENTS:

       o This routine allocates a LOGINREC structure for use  with  dbo-
         pen().






  dblogin                 Version 4.0 -- 5/1/89                        2
  ______________________________________________________________________

       o 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-via   DBSETLHOST(),
         DBSETLUSER(),  DBSETLPWD(),  and DBSETLAPP(), 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.
       o Here's a program fragment that uses dblogin():










  3                       Version 4.0 -- 5/1/89                  dblogin
  ______________________________________________________________________
         DBPROCESS       *dbproc;
         LOGINREC        *loginrec;

         loginrec = dblogin();
         DBSETLPWD(loginrec, "server_password");
         DBSETLAPP(loginrec, "my_program");
         dbproc = dbopen(loginrec, "my_server");


       o Once the application has  made  all  its  dbopen()  calls,  the
         LOGINREC  structure  is  no  longer necessary.  The program can
         then call dbloginfree() to free the LOGINREC structure.

  RETURNS:
       A pointer to a LOGINREC structure. dblogin() returns NULL if  the
       structure could not be allocated.




  dblogin                 Version 4.0 -- 5/1/89                        4
  ______________________________________________________________________

  SEE ALSO:
       dbloginfree, dbopen, dbrpwclr, dbrpwset,  DBSETLAPP,  DBSETLHOST,
       DBSETLPWD, DBSETLUSER















Typewritten Software • bear@typewritten.org • Edmonds, WA 98026