AnsweredAssumed Answered

Locking Fields through GEL

Question asked by J1mzz on May 11, 2011
Latest reply on May 18, 2011 by mark
I've had a couple of instances where I have needed to lock fields on an object when something is updated on another object. To do this I have simply inserted some rows into the odf_locked_attributes table with something like this:

INSERT INTO odf_locked_attributes (id, object_code, odf_pk, attribute_code, created_date, created_by, last_updated_date, last_updated_by)
VALUES(odf_locked_attributes_s1.nextval, <object_code>, <instance_id>, <attribute_code>, sysdate, 1, sysdate, 1)

This works great in Oracle and I haven't had a problem with it, but now I am working on an instance that uses SQL Server. Anyone know how to do this on SQL Server? They don't use sequences there, so I need to know how to get the 5000000 number that it needs for the row. Thanks.

Outcomes