Solved

CRecordset functions

Posted on 2003-11-28
2
279 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
Comment Utility
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
Comment Utility
What's in your derived functions?
Do you simply pass control back to the base class ::Open() and ::CanAppend()?
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
format the code in java 6 72
countEvens challenge 2 57
java ^ examples 8 57
twoTwo  challenge 35 86
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now