Update where current of...
Posted in 1994
John Regep (uunet!kmart!jregep) writes... > Does anyone know of a problem using UPDATE WHERE CURRENT OF statement? > We are using Informix 4.10 Tools and engine. We declare a SELECT cursor > FOR UPDATE for each row in an input array, after the row, we then do an > UPDATE WHERE CURRENT OF statement. The error we get is -346 Could not update > row in the table. ISAM -126 bad row id (or -105 bad isam file format). > ... I don't know what the exact problem is, but one of the first things to come to mind is a locking problem. A cursor for update will try to lock each record as it is fetched and will not release any locks until the cursor is closed. The problem is that you run out of locks. The simplest solution short of increasing the number of locks is to lock the entire table. Informix will see that it has locked the table and therefore doesn't need to lock the individual records. Hope this helps... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Miguel A. Caldera ! Antares Development Corp. ! Phone (210) 490-9626 mac@antares-dev.com ! 1000 Central Pkwy North ! Fax (210) 490-0874 73564,2200 Compuserve ! San Antonio, TX 78232 USA ! #include <std_disclaim.h> ----------------------------------------------------------------------------- =-> I haven't lost my mind, I know exactly where I left it!!! <-=