VC++ MFC ODBC应用程序 数据库可以删除,但无法添加和修改记录
voidCMyView::OnAppendrecord(){//TODO:Addyourcontrolnotificationhandlercodehereif(m_IP...
void CMyView::OnAppendrecord()
{
// TODO: Add your control notification handler code here
if (m_IP)
OnMove(ID_RECORD_FIRST);
try
{
m_pSet->AddNew();
}
catch(CDBException* e)
{
AfxMessageBox(e->m_strError);
e->Delete();
}
m_IP = TRUE;
UpdateData(FALSE);
} 展开
{
// TODO: Add your control notification handler code here
if (m_IP)
OnMove(ID_RECORD_FIRST);
try
{
m_pSet->AddNew();
}
catch(CDBException* e)
{
AfxMessageBox(e->m_strError);
e->Delete();
}
m_IP = TRUE;
UpdateData(FALSE);
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询