Why do I get ASP Error Cannot update. Database or object is read-.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access 2002 but database default is 2000, tried converting to 2002
didn't help. ASP programming AddNew error message Cannot update. Databse or
object is read only. Using objRS.Open "HR1", strConnect, adOpenStatic,
adLockOptimistic, adCmdTable. Why does it consdier this database read only?
 
HR1 is a table it does not now have a primary key. Previously I set the
primary key as the first field to be updated/added to the recordset. The
field is the CompanyID and is the key field for establishing relationships to
other tables. Are you thinking I should set a primary key in the table using
autonumber?
 
Hi,
I'm thinking that ADO is treating it as read only beacuse there is no PK.
It doesn't have to be an auto-number but in order to write to it, you might
have to add one.
 
Back
Top