Hi
here is what we want:
when process A selects a row for update, process B will only be allowed to
read only.
We are using DB2V8.2 Express Edition V8.2, and ODBC Driver is IBM DB2 ODBC
Driver. our application is C application.
the below is the SQL statements we have tried to lock the row, but none of
them works for me.
SELECT t0.EMP_FNAME, t0.EMP_LNAME, t0.EMP_TITLE from DBO_EMP t0 where
t0.KEY = 60 WITH RS USE AND KEEP UPDATE LOCKS
SELECT t0.EMP_FNAME, t0.EMP_LNAME, t0.EMP_TITLE from DBO_EMP t0 where
t0.KEY = 60 FOR UPDATE
SELECT t0.EMP_FNAME, t0.EMP_LNAME, t0.EMP_TITLE from DBO_EMP t0 where
t0.KEY = 60 FOR READ ONLY WITH RS USE AND KEEP EXCLUSIVE LOCKS
we also alter the DBO_EMP table with the command:
ALTER TABLE DBO_EMP LOCKSIZE ROW
I would much appreciate it if you guy could help me on this.
- BLACK