Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Marco Penengo — — source: Informix-list mailing list archive (1991-1998)
I'm using Informix 4.00 on SCO UNIX System V/386 and I have the following
problem:
within a transaction I need to select some records from a table (in a database
created in MODE ANSI) and lock them in exclusive mode to avoid that other users
modify these records until the end of the transaction.
My test contains this 4GL code:
SET ISOLATION TO REPEATABLE READ
DECLARE jcurscab CURSOR FOR
SELECT columns FROM table
WHERE condition
FOR UPDATE
FOREACH jcurscab INTO record[].*
..
..
END FOREACH
wait for user input
COMMIT
Using the code in two different programs with different condition I
noted that if one of them is blocked waiting for input another copy of
the program the SELECT fails with error -243.
Do these statements lock all the table or just the rows that satisfy the
condition ? How do I lock ONLY the records that match condition ?
Thank you for your help.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.