Hi,

What's the best way to keep a record locked while you are modifying it so
that nobody else can change the record (reading it should be allowed)?

My first guess would be to create a cursor in the following way:

Declare myCursor CURSOR LOCAL SCROLL_LOCKS FOR
SELECT RefNextSeqNo, IsRefAutoGen, RefPrefix
FROM TrxnTypes
WHERE id = TrxnTypeId

(id has a unique index on it and the query will therefore return at most 1
row)


Is that a good way of locking a single row so that it can still be read by
the others but it cannot be modified?


Thanks
Ioannis