// Todo: Add extra validation here
Updatedata (TRUE);
CString strsql;
// CRESOURESET M_RECORDSET (& M_Database);
INT i = 1;
INT FLAG = 0;
While (! flag) {
Cbookset M_Recordset (& M_Database);
strsql.format ("SELECT * from Book Where Book_ID =% D", I);
m_recordset.open (AFX_DB_USE_DEFAULT_TYPE, STRSQL);
IF (m_recordset.getRecordcount () == 0) {
Strsql.Format ("INSERT INTO BOOK VALUES (% D, / '% S /', / '% S /',% D,% D,% D,% F)", I, M_Name, M_AUTHOR, 0, M_COURSEID , m_quantity, m_price;
M_Database.executesql (strsql);
m_database.close ();
CDIALOG :: Onok ();
FLAG = 1;
}
i ;
//m_recordset.delete ();