MFC
-
i have a dialog box where i am having a combo-box control and two edit controls.i want to insert the value of the combo box which i select and also of the two d\edit controls into a table in oracle database when i click the ok button.i want to use the CDatabase.ExecuteSqlQuery command.how should i write the insert statement.
-
i have a dialog box where i am having a combo-box control and two edit controls.i want to insert the value of the combo box which i select and also of the two d\edit controls into a table in oracle database when i click the ok button.i want to use the CDatabase.ExecuteSqlQuery command.how should i write the insert statement.
m_combo.GetWindowText(strComboText);
m_edit1.GetWindowText(strEdit1Text);
m_edit2.GetWindowText(strEdit2Text);// you'll need to supply the name of your table, and the columns that are being updated
strSQLQuery.Format("INSERT INTO (column list) VALUES ('%s', '%s', '%s')",
strComboText, strEdit1Text, strEdit2Text);CDatabast.ExecuteSqlQuery(strSQLQuery);
A rich person is not the one who has the most, but the one that needs the least.