PRB: TRACE() Messages Displayed When Opening DatabaseLast reviewed: July 18, 1997Article ID: Q112823 |
1.50 4.20
WINDOWS
kbprg kbprb
The information in this article applies to:
SYMPTOMSThe following TRACE() messages appear in the Output window when calling CDatabase::Open() or CRecordset::Open():
Warning: ODBC Success With Info, Driver's SQLSetConnectOption failed State:IM006,Native:0,Origin:[Microsoft][ODBC DLL] Driver not capable. State:IM006,Native:0,Origin:[Microsoft][ODBC DLL] State:S1C00,Native:0,Origin:[Microsoft][ODBC Single-Tier Driver] CAUSEIn CDatabase::AllocConnect() located in DBCORE.CPP, the Microsoft Foundation Classes (MFC) contain the following line of code:
AFX_SQL_SYNC(::SQLSetConnectOption(m_hdbc, SQL_LOGIN_TIMEOUT, m_dwLoginTimeout));Because ODBC (Open Database Connectivity) doesn't provide a way to determine whether or not an ODBC driver uses a "login time-out," the database classes always try to set it before trying to connect. If SQLDriverConnect() is called and the driver doesn't support login time- outs, the above ODBC warning messages will occur.
RESOLUTIONBecause these are harmless warnings (that is, connecting was successful), you can ignore the warnings. Keep in mind that the login time-out has no affect on the data source.
MORE INFORMATIONThe debug version of MFC version 2.5 can provide TRACE() diagnostics specifically for the database classes. To enable database TRACE() messages, run the TRACER.EXE program. This program can be executed by clicking the "MFC Trace Options" icon in the Microsoft Visual C++ Program Manager group. When the program is displayed, select the check boxes titled "Enable Tracing" and "DB Tracing". The TRACE() messages shown above occur only if DB Tracing is enabled.
|
Additional reference words: 1.50 2.50 4.20 error timeout
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |