INF: Setting Application Name & Workstation ID From ODBC

Last reviewed: September 22, 1997
Article ID: Q149758

The information in this article applies to:
  • Microsoft SQL Server, versions 6.0 & 6.5

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."


Additional query words: sql65 sql6 debug
Keywords : SSrvProg kbinterop kbprg
Version : 6.0 6.5
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.