Export (0) Print
Expand All

dbsetlapp

SQL Server 2000

Sets the application name in the LOGINREC structure.

Syntax

RETCODE DBSETLAPP (
PLOGINREC
loginrec,
LPCSTR
application );

Arguments

loginrec

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

application

Is the application name that will be 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 stores only the first 16 characters and ignores the rest.

Returns

SUCCEED or FAIL.

Remarks

DBSETLAPP sets the application field in the LOGINREC structure. For it to have any effect, it must be called before dbopen. DBSETLAPP is optional. If you do not call DBSETLAPP, the application parameter of the LOGINREC structure is set to the calling application name by default instead of to NULL, as it is in SQL Server version 6.0 or earlier.

SQL Server uses the application name in its sysprocesses table to help identify your process. If you set the application name, you see it if you query the sysprocesses table in the master database.

See Also

dblogin

dbsetlpwd

dbopen

dbsetluser

dbsetlhost

Show:
© 2014 Microsoft