Solved

CRecordset functions

Posted on 2003-11-28
2
280 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 88
method notes when mouse over in eclipse 5 83
Window placement 17 75
Change to event 1 101
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 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

14 Experts available now in Live!

Get 1:1 Help Now