Solved

CRecordset functions

Posted on 2003-11-28
2
282 Views
Last Modified: 2013-11-20
Hi

I have a CRecordset derived class which I have added a new method too, to enable
records to be added in my own custom way.

When I try and call

if(!Open())                                          // Open the Project recordset
      return FALSE;
if(!CanAppend())                                    // check we can add to the recordset object
      return FALSE;

I get an exception. It seems that MFC doesn;t like these methods to be called from
within the derived CRecordset class.

Does anyone know any different, or a way of calling these functions from within
the dervived class??


Thanks in advance

LittlePerson
0
Comment
Question by:LittlePerson
2 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 50 total points
ID: 9837595
if(!Open())                                   // Open the Project recordset
     return FALSE;

Is the recordset already open at this point?

and equally for
if(!CanAppend())                              // check we can add to the recordset object
     return FALSE;

I would suggest putting a breakpoint at the two lines and seeing where the program ASSERTs when you step into the functions
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 10024541
What's in your derived functions?
Do you simply pass control back to the base class ::Open() and ::CanAppend()?
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Macro to save highlighted rows as a separate file 5 43
viewing source code from eclipse 13 104
wait notify demo infinite loop 3 110
Increment column based of a FK 8 20
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question