Re: HELP: Lock rows in Informix SE
Posted in 1997
Florian Kerbl wrote: > > UPDATE tablename > SET field = value > WHERE condition > > The above only works if the affected table is not already open. If the > table is open we get the following error messages: What do you mean "table is not already open". What other transactions are going on? > - 263: could not lock row for UPDATE > - 107: C-ISAM error: row locked > > The same happens if we try to insert records except that instead of error > message 263, we get the error message 271 ("new record can not be > inserted into table"). It looks like you are being locked out of the row or page that you want to update. What is the table's LOCK MODE (select locklevel from systables where tabname = "mytable";)? If page mode (locklevel=="P") then change it to ROW level (alter table mytable set lock mode (row);). If this happens intermittently and most inserts/updates get through the problem could just be a concurrency problem. Try setting the application's LOCK MODE TO WAIT <nseconds>. For more information please supply more details. Art S. Kagel, kagel@bloomberg.com