CDatabase::OpenEx() fails in ATL/COM dll
-
I've written a dll using ATL. It uses CDatabase to read values from a database. Everything works fine in a standard MFC app, but when I moved the code into a ATL/COM project it fails with the following error: "Only SQL_DRIVER_NOPROMPT is allowed when connection pooling is enabled" I access my database with the following, which according to MS Knowledge Base should solve the problem, but it doesn't: ... if(db->OpenEx(m_strConnection, CDatabase::noOdbcDialog)) ... Anyone had this problem?
-
I've written a dll using ATL. It uses CDatabase to read values from a database. Everything works fine in a standard MFC app, but when I moved the code into a ATL/COM project it fails with the following error: "Only SQL_DRIVER_NOPROMPT is allowed when connection pooling is enabled" I access my database with the following, which according to MS Knowledge Base should solve the problem, but it doesn't: ... if(db->OpenEx(m_strConnection, CDatabase::noOdbcDialog)) ... Anyone had this problem?
Hmmm... I haven't had this problem but it seems like you're doing everything correctly. Have you tried stepping into the OpenEx function with the debugger to see where exactly the problem comes from?