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.
Mario Garc�a — — source: Informix-list mailing list archive (1991-1998)
Hi,
We need to simulate the functionality of serial fields, because for
various reasons we cannot use them.
We have a field in a table that contains the number to be incremented -
the serial (in fact we have a row in that table for each serial to be
implemented) and we need to lock the row while the number is readed and
updated.
We thought to do it using 'select for update' but it seems not to work
because other users can read the old value after the 'select for update'
statement and before the commit.
Do you know why the select for update statement doesn't lock the row?
Anyone know if there is another way (or the best way) to simulate serial
fields?
The version of informix on-line we have is 7.23.UC7
The isolation level of the database is commited read ant the lock mode
is set to not wait.
Thank you in advance,
======================
Mario Garc'a Franco
Cap de Projecte
Centrisa - Val'ncia
e-mail: mgarcia@vlc.centrisa.es
tfn: 96 346 32 50
fax: 96 346 32 33
======================
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.