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. Carlos Antollini ADO classes

Carlos Antollini ADO classes

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasehelpquestion
2 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    Member 11110240
    wrote on last edited by
    #1

    We are using the Carlos Antollini ado classes in our C/C++ program and when I try to close the database it hangs. The function never returns. I cannot figure out why. Anyone have any ideas? m_pProjectDatabase declared as: CADODatabase* m_pProjectDatabase;

    if (m_pProjectDatabase != nullptr)
    {
    m_pProjectDatabase->Close();
    }

    This calls the ado2 function:

    void CADODatabase::Close()
    {
    try
    {
    if(IsOpen())
    {
    if(m_doxCatalog.m_pCatalog != NULL)
    {
    _ConnectionPtr pConn = m_doxCatalog.m_pCatalog->GetActiveConnection();
    pConn->Close();
    }
    }
    }
    catch(CString ex)
    {
    throw;
    }
    catch(_com_error &e)
    {

    	dump\_com\_error(e);
    	//throw (CString)"Error in CADODatabase::Close:" + (LPCSTR)e.Description();
    }
    catch(...)
    {
    	throw (CString)"Unexplained Error in CADODatabase::Close";
    }
    

    }

    and from there, nothing. Off into cyberspace never to be seen again.

    V 1 Reply Last reply
    0
    • M Member 11110240

      We are using the Carlos Antollini ado classes in our C/C++ program and when I try to close the database it hangs. The function never returns. I cannot figure out why. Anyone have any ideas? m_pProjectDatabase declared as: CADODatabase* m_pProjectDatabase;

      if (m_pProjectDatabase != nullptr)
      {
      m_pProjectDatabase->Close();
      }

      This calls the ado2 function:

      void CADODatabase::Close()
      {
      try
      {
      if(IsOpen())
      {
      if(m_doxCatalog.m_pCatalog != NULL)
      {
      _ConnectionPtr pConn = m_doxCatalog.m_pCatalog->GetActiveConnection();
      pConn->Close();
      }
      }
      }
      catch(CString ex)
      {
      throw;
      }
      catch(_com_error &e)
      {

      	dump\_com\_error(e);
      	//throw (CString)"Error in CADODatabase::Close:" + (LPCSTR)e.Description();
      }
      catch(...)
      {
      	throw (CString)"Unexplained Error in CADODatabase::Close";
      }
      

      }

      and from there, nothing. Off into cyberspace never to be seen again.

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      Did you debug this CADODatabase::Close() code?

      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