CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2025
    Posts
    1

    VC++ & ODBC, MS Acces database w/ multiple tables

    Hello,
    Regarding VC++ based tools w/ ODBC Access .mdb's.
    Recently discovered that, upon executing VC++ New Project Wizard, & pointing it to an .mdb source, that that same .mdb source can have multiple tables & the generated code supports it.
    But I can only realize that from a read-only perspective, having problems if I try to write to those tables.
    I rely on standard code like:
    m_pSet->Edit();
    Followed by make some update to the .mdb contents, then...
    m_pSet->Update();
    And if the .mdb source has just 1 table that works fine.
    But if the .mdb contains multiple tables, upon execution the error is declared: "Recordset is read-only".
    While the code above still compiles when multiple tables are involved, it's apparently insufficient in that it's not making EACH of the .mdb source's multiple tables edit -able.
    Presumably, in this case "m_pSet->Edit();" needs to specify the specific tables involved.
    Code suggestions appreciated.
    -rich

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: VC++ & ODBC, MS Acces database w/ multiple tables

    How do you open the recordset(s) containing multiple tables?
    Are there some relationships between these tables?
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured