Does FieldsToExcludeFromUpdate/Insert Work?


Author
Message
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 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

Replies
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
Then can I request a new property be added to excluded specific fields from the concurrency check?  Our DBA is not likely to add new fields to our database.

Ben

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
That is an understandable request.  You can also use OptimisticAllFields and create stored procedures for UPDATES... within the sproc, you're in complete control over what gets checked and how it gets checked for concurrency purposes.
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