Click here to Skip to main content
15,878,945 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Array of pointers to a functions Pin
veselin_iordanov24-Dec-03 8:09
veselin_iordanov24-Dec-03 8:09 
GeneralHooking the taskbar Pin
Rickard Andersson2023-Dec-03 13:08
Rickard Andersson2023-Dec-03 13:08 
GeneralRe: Hooking the taskbar Pin
Ryan Binns23-Dec-03 14:59
Ryan Binns23-Dec-03 14:59 
GeneralRe: Hooking the taskbar Pin
Rickard Andersson2024-Dec-03 0:28
Rickard Andersson2024-Dec-03 0:28 
Questionhow to create shortcut of a file from MFC Pin
Binayak23-Dec-03 12:27
Binayak23-Dec-03 12:27 
AnswerRe: how to create shortcut of a file from MFC Pin
Selvam R24-Dec-03 12:39
professionalSelvam R24-Dec-03 12:39 
Questionhow to modify system path? Pin
Binayak23-Dec-03 12:07
Binayak23-Dec-03 12:07 
Questionhow can i add and edit records to MS Access Pin
Member 78215423-Dec-03 12:00
Member 78215423-Dec-03 12:00 
Hi,

I am trying to add and edit records to MS Access database from a dialog box. I created a dialog box by using AppWizard. Also, i created a derived class of CRecordset by using ClassWizard. The following is my ONOK function:
void CComplaintDlg::OnOK()
{

// CDatabase complaints;
//complaints.OpenEx("DSN=Complaints",CDatabase::noOdbcDialog);
// complaints.Open("Complaints");
// complaintRecord cr(&complaints);
complaintRecord cr;
cr.Open();
cr.MoveLast();
if(!cr.CanUpdate())
AfxMessageBox("dd");
cr.AddNew();

UpdateData();
cr.m_CallerName = m_Complaint_Name;

cr.Update();

cr.Requery();
cr. Close();
CDialog::OnOK();
}

After i compile and run it, it does not update the data file. What did i do wrong?

Thanks in advance.Confused | :confused:



csgogogo
AnswerRe: how can i add and edit records to MS Access Pin
Selvam R24-Dec-03 12:54
professionalSelvam R24-Dec-03 12:54 
GeneralStatus dialog box Pin
Spank me!!23-Dec-03 11:57
Spank me!!23-Dec-03 11:57 
GeneralRe: Status dialog box Pin
Brad Bruce23-Dec-03 12:42
Brad Bruce23-Dec-03 12:42 
GeneralRe: Status dialog box Pin
j_a_m_s_p_o_o_n23-Dec-03 13:16
j_a_m_s_p_o_o_n23-Dec-03 13:16 
GeneralMimicing Swing Using C++ Problem Pin
Todd23-Dec-03 10:02
Todd23-Dec-03 10:02 
GeneralMatlab C++ Pin
Vincent Sim23-Dec-03 9:50
Vincent Sim23-Dec-03 9:50 
QuestionMFC Document / View - Who's on first? Pin
Vaclav23-Dec-03 9:43
Vaclav23-Dec-03 9:43 
AnswerRe: MFC Document / View - Who's on first? Pin
David Crow23-Dec-03 10:02
David Crow23-Dec-03 10:02 
Generaldrawing bitmap Pin
K. Shaffer23-Dec-03 7:12
K. Shaffer23-Dec-03 7:12 
GeneralRe: drawing bitmap Pin
Jörgen Sigvardsson23-Dec-03 7:13
Jörgen Sigvardsson23-Dec-03 7:13 
GeneralRe: drawing bitmap Pin
Ryan Binns23-Dec-03 15:04
Ryan Binns23-Dec-03 15:04 
GeneralProcess host... Pin
Orkun GEDiK23-Dec-03 6:53
Orkun GEDiK23-Dec-03 6:53 
GeneralRe: Process host... Pin
Selvam R23-Dec-03 11:29
professionalSelvam R23-Dec-03 11:29 
GeneralRe: Process host... Pin
Orkun GEDiK23-Dec-03 12:37
Orkun GEDiK23-Dec-03 12:37 
GeneralFile exists Pin
act_x23-Dec-03 6:27
act_x23-Dec-03 6:27 
GeneralRe: File exists Pin
Joe Woodbury23-Dec-03 6:58
professionalJoe Woodbury23-Dec-03 6:58 
GeneralRe: File exists Pin
David Crow23-Dec-03 10:05
David Crow23-Dec-03 10:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.