ADO AddNew Record
-
I want to add new records with my program to my database but I don't know how to do this . please help me.
Are you wanting to know how to use CRecordset::AddNew()?
-
Are you wanting to know how to use CRecordset::AddNew()?
-
yes I want to know how can I use this method in a dialog base application . please give me an example
Have you checked out MSDN, or Googled for examples?
-
Have you checked out MSDN, or Googled for examples?
-
yes but I cann't find something that help me. try { //update the current record //CGuard obj; piAdoRecordBinding->Update(&rsRecSet); //can we add a new record? if(m_pRs->Supports(adAddNew)) { piAdoRecordBinding->AddNew(&rsRecSet); } is it correct
roshanak wrote: yes but I cann't find something that help me. Try: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Recordset.3a_.Adding.2c_.Updating.2c_.and_Deleting_Records_.28.ODBC.29.asp[^] -Nick Parker
-
I want to add new records with my program to my database but I don't know how to do this . please help me.
Use Carlos Antollini's set of ADO classes http://www.codeproject.com/database/caaadoclass1.asp[^] They do all the hard parts for you. John
-
yes but I cann't find something that help me. try { //update the current record //CGuard obj; piAdoRecordBinding->Update(&rsRecSet); //can we add a new record? if(m_pRs->Supports(adAddNew)) { piAdoRecordBinding->AddNew(&rsRecSet); } is it correct
In this case AddNew is done through the CADORecordsetBinding class and since you don't know much about this subject, you should not use this method (until you improve your ADO skills) because it is not that straight forward. On the other hand, database programing is something that takes a couple of weeks at least to understand, so just by looking at examples won't work. // Afterall I realized that even my comment lines have bugs