Inserting new rows thru ms-access form

  • Recently I upsized the Access database to Sqlserver 2000 and keeping .adp as front end. It has no primary key, so I added one autoincremented field. Through MS-Access forms they want to retrieve the existing data and modify , insert new data. Everything is working well in denormalized form. When I tried to normalize with identity as PK in the parent table and that has references in child table, the problem arises. It does not allow me to insert the new data. But no problem in viewing  and modifying the existing data. I wrote only  select stored procedure for retrieving data in server side. It is working well for the denormalized table but not for normalized one. Is it advisable to keep identity column as PK and tried to insert all the parent tables and child tables.

  • What's the error message you are getting?

  • You can't update the record because another user or application has changed or deleted the value of PrimaryKey. But PK and FK relationships have been set up

  • The real question is : Has it been deleted or not created in the first place. The parent of the relationship must exists before any child can be added.

  • It has not been created

  • You'll have to create it in the beforeinsert() event if you want to stop that error... or forbid that they enter data for child, whichever makes sens in your application.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply