PRB: OpenEx() May Fail with "ODBC;" in Connection StringLast reviewed: June 26, 1997Article ID: Q157126 |
The information in this article applies to:
SYMPTOMSWhen you specify a connection string that begins with the characters ODBC;, CDatabase::OpenEx() does not behave as expected. OpenEx() may fail to open an ODBC datasource using a connection string that worked with Open(). Some drivers may appear to ignore information in the connection string, such as the userid and password. You may also get an error message in the output window similar to the following:
Invalid connection string attribute CAUSECDatabase::OpenEx() does not accept a connection string beginning with ODBC;.
RESOLUTIONRemove the ODBC; prefix from the connection string for OpenEx().
MORE INFORMATIONCDatabase::Open() removes the ODBC; prefix from the connection string before passing it to OpenEx(). If an invalid connection string is passed to the driver, it will look in the registry for connection information.
REFERENCESVisual C++ Books Online Help for CDatabase::OpenEx(). Visual C++ Books Online Help for SQLDriverConnect(). |
Keywords : kbprg kbusage MfcDatabase
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |