View Single Post
  #1  
Old October 14th, 2005, 02:20 AM
Pete Nurse
external usenet poster
 
Posts: n/a
Default Access ADO Form Insert Bug

I have a bound subform (employee) which linked to the parent form
(company) by the argument to the subform's SQL Server stored procedure
(SP). The UniqueTable property is set to "tblEmployee".

Depending on the complexity of the SP (more of which later), after I
insert a record I get the following message...

"Key value for this row was changed or deleted at the data store. The
local row is now deleted" and then Still on the new record - all the
fields change to #Deleted. Then the message "Multiple-step operation
generated errors. Check each status value" appears.

I can only release myself from this situation by closing the form, the
"Multiple-step..." error appear many times followed by "Another user or
application has deleted this record or changed the value of its primary
key".

On return to the form the new employee record is there in all its
beauty. I therefore conclude that there was actually nothing wrong
with the new record.

As I hinted, the problem seems to be related to the complexity of the
SP eg "SELECT Coy.*, Emp.*..." causes the above errors but "SELECT *
FROM ..." doesn't(!). I don't want to chase that particular art down
the drainpipe, though, because I'm looking for a solution in which I
can any valid SP code.

That's not all though...

....If I dumb down the design of the SP enough to enable me to insert a
new employee record, an entirely unrelated employee record (ie an
employee from another company) appears in the subform (!!). After I
refresh the subform, the rogue record disappears and the newly added
record appears.

Does anyone know what's going on here?