Export (0) Print
Expand All

dbsetluser

SQL Server 2000

  New Information - SQL Server 2000 SP3.

Sets the username in the LOGINREC structure.

Syntax

RETCODE DBSETLUSER (
PLOGINREC
loginrec,
LPCSTR
username );

Arguments

loginrec

Is a pointer to a LOGINREC structure, which is passed as a parameter to dbopen. To get one of these pointers, call dblogin.

username

Is the username that is sent to Microsoft® SQL Server™ 2000. It must be a null-terminated character string. The maximum length of the string is 30 characters, not including the null-terminating character. SQL Server uses it to determine who is attempting the connection. The SQL Server usernames are defined in the syslogins table in the master database.

Returns

SUCCEED or FAIL.

Remarks

For DBSETLUSER to have any effect, it must be called before dbopen.

Security Note  When possible, use DBSETLSECURE to enable Windows Authentication rather than using DBSETLUSER and DBSETLPWD to enable SQL Server Authentication.

See Also

dblogin

dbsetlhost

dbopen

dbsetlpwd

dbsetlapp

Show:
© 2014 Microsoft