The information in this article applies to:
SUMMARYA successful connection to Microsoft SQL Server using the Microsoft SQL Server ODBC drivers will always return SQL_SUCCESS_WITH_INFO. If the application then calls SQLError() until it returns SQL_NO_DATA_FOUND there will be at least one 5703 and one or two 5701 messages. MORE INFORMATION
SQL Server always issues at least two informational messages on a
successful connection from any ODBC or DB-library client: A 5701 message,
indicating which database on the server the user has been logged into, and
a 5703 message, indicating what language the server is using. SQL Server's
DB-library API and the Microsoft SQL Server ODBC driver always make these
messages available on successful connects in case the application needs to
use this information.
Applications can simply ignore these 5701 and 5703 messages, they are purely informational. Applications cannot, however, ignore a return of SQL_SUCCESS_WITH_INFO return code on the SQLConnect(), SQLDriverConnect(), or SQLBrowseConnect(). This is because messages other than 5701s and 5703s may be returned that do require action. For example, if a driver connects to a SQL Server with outdated system stored procedures, the following will be one of the messages returned through SQLError():
Applications need to code their error handling routines for SQL Server connections to call SQLError() until it returns SQL_NO_DATA_FOUND, and act on any messages other than the ones that return a pfNative code of 5701 or 5703. Additional query words: 2.50.0121
Keywords : SSrvProg |
Last Reviewed: March 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |