Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

CRecordset functions

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
LittlePerson
Asked:
LittlePerson
1 Solution
 
AndyAinscowCommented:
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
 
TriskelionCommented:
What's in your derived functions?
Do you simply pass control back to the base class ::Open() and ::CanAppend()?
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now