dbsetlsecure

Sets the secure connection flag in a LOGINREC structure.

Syntax

RETCODE DBSETLSECURE ( PLOGINREC ploginrec );

Arguments
ploginrec
A pointer to a LOGINREC structure, which is passed as a parameter to dbopen. You can get one of these pointers by calling dblogin.
Returns

SUCCEED or FAIL.

Remarks

By setting the secure connection flag in a LOGINREC structure with DBSETLSECURE, the application requests a secure, or trusted, connection to Microsoft® SQL Server™. This means that SQL Server will use Windows NT Authentication security to establish connections made (using dbopen) with this LOGINREC, regardless of the current login security mode at the server. Any login ID or password supplied by DBSETLUSER or DBSETLPWD is ignored.

To use DBSETLSECURE and trusted connections, you must first use xp_grantlogin to grant SQL Server system administrator or user privilege to the appropriate Microsoft Windows NT®-based groups or users. Use xp_revokelogin to revoke SQL Server permissions and stop a user or group from using a trusted connection.

Note that DBSETLSECURE enables trusted connections even when the server is in Mixed Mode.

See Also
dblogin dbsetlhost
dbopen dbsetluser
dbsetlapp Authentication

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.