Trigger: UPDATE INSERT Problem

Trigger: UPDATE INSERT Problem

Post by Steven Keel » Thu, 20 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.

Any help would be appreciated,

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.

Thanks in advance, Steven

2. SQL CLIENT

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

4. LOcks

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

6. pgsql-server/src backend/libpq/Tag: backend/li ...

7. Update Trigger and ChildID Insert Trigger

8. How can I use SQL to create a database?

9. SQL 6.5 SP5 Problem for Insert Trigger Update Function

10. INSERT trigger versus UPDATE/DELETE trigger

11. Which record triggers an INSERT, UPDATE Trigger

12. Insert & Update Trigger Problem

13. Updating Inserted record in Insert Trigger?