E_NOINTERFACE method result on OLEDB ODBC connection result set update RRS feed

  • Question

  •      I have a MySQL database  and I made a connection on it from a MFC VisualC++2003.net application after I previously installed MySQL ODBC 5.1 driver on my computer with Windows10. The provider I choose when I defined my application was Microsoft OLE DB Provider for ODBC drivers. The application environment automatically declare a m_pSet variable for the database connection result set and opens the result set with OpenAll() method, calling m_pSet.OpenAll(). I see the data in the result set when I display it on the screen  but I can't update it using either Update() or UpdateAll() methods, calling m_pSet.Update() or m_pSet.UpdateAll(). The Update() method returns a HRESULT result type variable equal in this case with E_NOINTERFACE. My program sequence is the following:

    `void Cp2View::OnBnClickedButton1()


                // TODO: Add your control notification handler code here


                lstrcpyn(m_pSet->m_NUME, (LPCTSTR)m_nume, 16);

                lstrcpyn(m_pSet->m_PRENUME, (LPCTSTR)m_prenume, 16);


                HRESULT x=m_pSet->Update();



    My read/write connection string is:


        db_source(L"Provider=MSDASQL.1;Persist Security Info=False;User              ID=root;Data Source=BD_FILE_MYSQL;Mode=ReadWrite;Extended Properties=\"DSN=BD_FILE_MYSQL;UID=root;\";Initial Catalog=fisier"),



    I assume that applications OLEDB interface should have a method for write if it has a method for read witch works well. Why does not let me use it? Do I make a mistake somewhere?


    Thursday, December 24, 2015 9:44 AM