home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / usr / sybase / doc / dblogin.man < prev    next >
Encoding:
Text File  |  1993-04-22  |  2.1 KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                  dblogin
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dblogin
  6.  
  7.   FUNCTION:
  8.        Allocate a login record for use in dbopen().
  9.  
  10.   SYNTAX:
  11.        LOGINREC *dblogin()
  12.  
  13.  
  14.   COMMENTS:
  15.  
  16.        o This routine allocates a LOGINREC structure for use  with  dbo-
  17.          pen().
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dblogin                 Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.        o There are various routines available to  supply  components  of
  28.          the LOGINREC.  The program may supply the host name, user name,
  29.          user   password,   and   application   name-via   DBSETLHOST(),
  30.          DBSETLUSER(),  DBSETLPWD(),  and DBSETLAPP(), respectively.  It
  31.          is generally only necessary for the program to supply the  user
  32.          password  (and even this can be eliminated if the password is a
  33.          null value).  The other variables  in  the  LOGINREC  structure
  34.          will be set to default values.
  35.        o Here's a program fragment that uses dblogin():
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                  dblogin
  47.   ______________________________________________________________________
  48.          DBPROCESS       *dbproc;
  49.          LOGINREC        *loginrec;
  50.  
  51.          loginrec = dblogin();
  52.          DBSETLPWD(loginrec, "server_password");
  53.          DBSETLAPP(loginrec, "my_program");
  54.          dbproc = dbopen(loginrec, "my_server");
  55.  
  56.  
  57.        o Once the application has  made  all  its  dbopen()  calls,  the
  58.          LOGINREC  structure  is  no  longer necessary.  The program can
  59.          then call dbloginfree() to free the LOGINREC structure.
  60.  
  61.   RETURNS:
  62.        A pointer to a LOGINREC structure. dblogin() returns NULL if  the
  63.        structure could not be allocated.
  64.  
  65.  
  66.  
  67.  
  68.   dblogin                 Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.  
  71.   SEE ALSO:
  72.        dbloginfree, dbopen, dbrpwclr, dbrpwset,  DBSETLAPP,  DBSETLHOST,
  73.        DBSETLPWD, DBSETLUSER
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.