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               DBSETLUSER
  ______________________________________________________________________

  NAME:  DBSETLUSER

  FUNCTION:
       Set the username in the LOGINREC structure.

  SYNTAX:
       RETCODE DBSETLUSER(loginrec, username)

       LOGINREC  *loginrec;
       char      *username;

  COMMENTS:







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

       o This macro sets the username in the LOGINREC structure. For  it
         to have any effect, it must be called before dbopen().
       o In most environments, this macro is optional.   If  it  is  not
         called, DB-Library will generally set the default value for the
         username.

         Note for VMS programmers:  On VMS the username defaults to  the
         USER logical name.
         Note for UNIX programmers:  On UNIX the  username  defaults  to
         the UNIX login name.

         Note for MS-DOS and OS/2 programmers:  On MS-DOS and  OS/2  the
         username  defaults to the SYBUSER environment variable, if any.
         If the application does  not  call  DBSETLUSER(),  the  SYBUSER
         environment  variable  must  be  set.  Otherwise, dbopen() will
         fail when it tries to log into the SQL Server.



  3                       Version 4.0 -- 5/1/89               DBSETLUSER
  ______________________________________________________________________
         Note for Macintosh programmers:  On the Macintosh there  is  no
         default   username.    Therefore,  the  application  must  call
         DBSETLUSER().  If it does not, dbopen() will fail when it tries
         to log into the SQL Server.

  PARAMETERS:
       loginrec -  A pointer to a  LOGINREC  structure,  which  will  be
           passed  as  an argument to dbopen().  You can get one by cal-
           ling dblogin().
       username -  The username that will be  sent  to  SQL Server.   It
           must  be  a  null-terminated  character  string.  The maximum
           length of the string, not including the null  terminator,  is
           30 characters.  SQL Server will use username to determine who
           is attempting the connection.  The SQL Server  usernames  are
           defined in the syslogins table in the master database.

  RETURNS:



  DBSETLUSER              Version 4.0 -- 5/1/89                        4
  ______________________________________________________________________
       SUCCEED or FAIL.

  SEE ALSO:
       dblogin, dbopen, DBSETLHOST, DBSETLPWD, DBSETLAPP















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