I`m using the following Tutorial to create a Simple MFC application the problem is in inserting new rows in the table The application shows an error saying Recordset is Read-only. Is there any variable that needs to be set to change Recordset to write mode?
void CSampleDBView::OnBnClickedInsert()
{
CStringW text;
m_input.GetWindowTextW(text);
m_pSet->m_student=text;
m_pSet->AddNew();
m_pSet->Update();
AfxMessageBox(text);
}
This is the code that Adds a new row when button is clicked. m_input is a EditControl From where the Text to be inserted is recieved.