Trigger: UPDATE INSERT Problem

Trigger: UPDATE INSERT Problem

Post by Steven Keel » Sat, 22 Jan 2000 04:00:00



Hello,

I am using the following trigger to update a date field:

CREATE TRIGGER trHdwr_TranPert_IU ON dbo.tblHdwr_TranPert
FOR INSERT, UPDATE

AS

UPDATE tblHdwr_TranPert

SET tblHdwr_TranPert.dtm_TranPert_Updated = getdate()
FROM tblHdwr_TranPert, inserted
WHERE tblHdwr_TranPert.id_TranPert = inserted.id_TranPert

I am using MS Access to update the tables (view).
When I edit a record, move to the next record, and then move back to the
original record to edit it again, I get the following dialog box in (MS
Access):

"The data has been changed.  Another user edited this record and saved the
changes before you attempted to save changes.  Re-edit the record."

When I close the dialog box, I can then make changes.  Also, I am using the
same trigger for multiple tables, and except for this one table, they all
are working.

Thanks in advance, Steven

 
 
 

1. Trigger: UPDATE INSERT Problem

Hello,

I am using the following trigger to update a date field:

CREATE TRIGGER trHdwr_TranPert_IU ON dbo.tblHdwr_TranPert
FOR INSERT, UPDATE

AS

UPDATE tblHdwr_TranPert

SET tblHdwr_TranPert.dtm_TranPert_Updated = getdate()
FROM tblHdwr_TranPert, inserted
WHERE tblHdwr_TranPert.id_TranPert = inserted.id_TranPert

I am using MS Access to update the tables (view).
When I edit a record, move to the next record, and then move back to the
original record to edit it again, I get the following dialog box in (MS
Access):

"The data has been changed.  Another user edited this record and saved the
changes before you attempted to save changes.  Re-edit the record."

When I close the dialog box, I can then make changes.  Also, I am using the
same trigger for multiple tables, and except for this one table, they all
are working.

Any help would be appreciated,

Thanks in advance, Steven

2. MS Access can not change focus to control button

3. Create Trigger - Insert, Update - not updating record on Insert

4. Need to find top 10 active tables

5. puzzling issue with inserted, updated and IF UPDATE(column) in an update trigger

6. Using UNIONS - Junior Programmer????

7. INSERT trigger versus UPDATE/DELETE trigger

8. foreign key dependencies?

9. Insert & Update Trigger Problem

10. Which record triggers an INSERT, UPDATE Trigger

11. Update Trigger and ChildID Insert Trigger

12. SQL 6.5 SP5 Problem for Insert Trigger Update Function

13. Insert/Update Trigger - multiple inserts.