Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CDatabase::OpenEx() fails in ATL/COM dll

CDatabase::OpenEx() fails in ATL/COM dll

Scheduled Pinned Locked Moved C / C++ / MFC
databasec++helpcomquestion
2 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 2625
    wrote on last edited by
    #1

    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?

    A 1 Reply Last reply
    0
    • U User 2625

      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?

      A Offline
      A Offline
      Alvaro Mendez
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups