I have two tables in an Access database, a parent and child. I have a connection, and two ADO recordsets, one each for the parent and child tables. They're both opened with a string of SQL, adOpenDynamic, adLockOptimistic, adCmdText. The logic is to see if something specified in the spreadsheet exists in the database, and, if not, add a child and its parent. I set a filter on the parent (multiple criteria) and check for EOF. When that happens, I can rsChild.addnew, but when I try to rsParent.AddNew if blows up with 80040E09: "Cannot update. Database or object is read-only" Obviously the database is not read only, as i can add a record to the child table, and I've tried adOpenKeyset just as a guess, but the same thing happens. The connection string is simple: cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\users\me\desktop\blah_blah.accdb;" Can't two recordsets share the same connection for other than reads?
So, what gives? What could cause that? Any help would be appreciated. BTW, all this is in Windows 10 & Office 2016 64-bit. Thanks in advance.
So, what gives? What could cause that? Any help would be appreciated. BTW, all this is in Windows 10 & Office 2016 64-bit. Thanks in advance.