Does FieldsToExcludeFromUpdate/Insert Work?


Author
Message
Ben Kim
Ben Kim
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: Forum Members
Posts: 99, Visits: 253
I have a handful of fields that are handled on the backend (MS-SQL 2K) in a trigger.  I assumed that the FieldsToExcludeFrom Update would take care of my issue from collisions during update.  Unfortunately the collision still occurs.  Here are the fields I have excluded:

SQLRegionID
SQLLastUpdated
SQLIPAddress
SQLEmployeeID

I do not use these fields in the form I have created.  The trigger code follows:

CREATE TRIGGER trgInsUpdOffClass ON dbo.OffClass
FOR INSERT, UPDATE
AS
UPDATE OffClass
SET SQLLastUpdated = GetDate(),
SQLEmployeeID = dbo.fnGetContextLogin(),
SQLIPAddress = dbo.fnGetMACAddress()
FROM Inserted i
WHERE i.SQLGUID = OffClass.SQLGUID

The SQLLastUpdated column is causing the collision.

Ideas?

Ben

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search