MFC CRecordsets and primary keys

This is a discussion on MFC CRecordsets and primary keys within the Windows Programming forums, part of the Platform Specific Boards category; I've been trying to use CRecordsets with an ODBC connection in an MFC app (non-wizard created). I've just got to ...

  1. #1
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537

    MFC CRecordsets and primary keys

    I've been trying to use CRecordsets with an ODBC connection in an MFC app (non-wizard created). I've just got to the point where I can add a new record but now it tells me that my changes cannot be made because they cause duplicates in the index, the primary key or the relationship. Now I can see this isn't true because I have an id value for exactly this reason, so my question is how do I fix it? Can I define the fields to be used as the primary key somehow? Or is there something else I can do?
    Last edited by endo; 10-07-2002 at 03:16 PM.
    Couldn't think of anything interesting, cool or funny - sorry.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21