INF: Setting Application Name & Workstation ID From ODBCID: Q149758
|
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.
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."
Additional query words: sql65 sql6 debug
Keywords : kbinterop kbprg SSrvProg
Version : 6.0 6.5
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 25, 1999