sql server - Update Database MFC C++ ODBC CRecordset -
i'm developing mfc application (sdi) update, add , delete table in database called security. problem after updating 1 row in table, row updated ( verified) when action (updating row or deleting row) update canceled. don't know if there problem crecordset or database itself.
//m_pset instance of class based on crecordset: m_pset->open(); m_pset->edit(); m_pset->m_security_id = sec->securityid; m_pset->m_security_name = sec->securityname; m_pset->m_security_type_id = sec->securitytypestringtoint(); if (!m_pset->update()) { afxmessagebox(_t("record not updated; no field values set.")); }
in experiences oracle
, sql server
there difference in way commit
statements happen. behavior seeing implies update
not implicitly committed.
in oracle
, commits explicit statement , need conducted after have carried out transaction.
in sql server
, commits implicit default , not need carried out after transactions.
that being said, other other stack overflow question , answer appears have 2 methods of making commits explicit in sql server, meaning without commit, may lose transaction.
the first being can use begin transaction
have database wait commit statement. have posted, seem not case.
the other way make commit
statements explicit in sql server changing settings on databsae itself. based on line of thought check settings referred in post noted here , ensure did not make commits implicit.
Comments
Post a Comment