How to "lock" a table to mark it in use.
Posted in 1994
We have a problem regarding table "locking". Not so much locking, but marking a table is in use. We originally stored a record in another table stating that the table in question is in use and then delete the record when finished. However, this is very messy and causes problems ( especially trying to enhance the functions to our customer's needs and forgetting to delete the record, etc...). We have a new way. What we do is DECLARE a cursor that SELECTs a row from the table where rowid = 0. This works great ( ONLINE works, too ), except for, now, we need it to be somewhat recursive ( up to 50 levels ) and not release it until the top level is finished. Now, without having a 50 CASE statement and pass in the level, does anyone know of a way to accomplish this? Our Informix is: INFORMIX-4GL Version 4.10.UC3 ( C-Code ) INFORMIX-4GL Version 4.10.UC3 ( P-Code ) INFORMIX-SQL Version 4.10.UD2 ( SE ) INFORMIX-SQL Version 4.10.UD3 ( ONLINE ) Much thanks in advance, Robert Minter |Data Systems Support| \\\\\\_/// Programmer, Software Development | Orange, CA | ( _ _ ) internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/ #include <disclaimer.h> SURF'S UP \\_/