Read-only data instead of Updatable records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Frankel
    New Member
    • Jan 2012
    • 9

    Read-only data instead of Updatable records

    Hi all,

    I am having trouble with DAO (VB6) reading an Access database. I keep getting a "read-only" recordset instead of Updatable one.

    Code:
          Set qdfLocal = dbsCurrent.OpenRecordset(myQuery, dbOpenDynaset)
    the help file suggests that the Jet engine can't create an editable recordset, but I don't know where to look for the error.
    This code works in other parts of the application (different table).
    I have tried recreating the table in Access and copying the data into that, to no avail.

    Any help would be welcome
    thanks
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    I'd hazard a guess that it depends on what myQuery says. If it's a table, then probably you should be able to update it. But if it's a complex query using JOINs and so on, maybe not. If it uses any aggregate functions, then I'd expect updating is impossible (on the other hand, I'm no SQL expert).

    However, you're likely to find more Access-related expertise over in our Access/VBA forum.

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      How is the Query...?
      Say if you are querying from multiple tables, with Join, then the recordset will be read-only.

      If the Query is for Single Table, then 'dbOpenDynaset' , should work...


      Regards
      Veena

      Comment

      Working...