INF: Setting Application Name & Workstation ID From ODBC (149758)
The information in this article applies to:
- Microsoft SQL Server 6.0
- Microsoft SQL Server 6.5
This article was previously published under Q149758 SUMMARY
This article discusses how ODBC applications using the Microsoft SQL Server
ODBC Driver can set the application name and workstation ID when they
connect to SQL Server. If you use other ODBC SQL Server drivers, you should
consult your driver's documentation to see if it supports equivalent
functionality.
MORE INFORMATION
Db-library applications can use the DBSETLAPP and DBSETLHOST functions to
set the value of the program_name and hostname columns in
master.dbo.sysprocesses. These values are then displayed in the output of
some of the SQL Server system stored procedures, such as sp_who. VBSQL
applications can use the SQLSetLApp and SQLSetLHost functions for the same
purpose.
Users of the Microsoft SQL Server ODBC driver can set the same values using
the driver specific APP= and WSID= keywords on a SQLDriverConnect(). For
more information, consult the driver documentation on SQLDriverConnect,
either in the driver help file Drvssrvr.hlp, in the ODBC SQL Server
Driver section in the SQL Server 6.0 "Books Online," or in the section
"Programming ODBC for SQL Server" in the SQL Server 6.5 "Books Online."
Modification Type: | Major | Last Reviewed: | 10/31/2003 |
---|
Keywords: | kbhowto kbinterop kbprogramming KB149758 |
---|
|