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.
Peter Strempel — — source: Informix-list mailing list archive (1991-1998)
We have written a small program to archive and then delete rows from two
tables in a fairly large DB. One table is a header type table with its
associated detail rows in a detail type table. A brief outline of the
program follows.
When the program is run it falls over after varying numbers of rows with
the following error:
SQL statement error number -240
Could not delete a row
SYSTEM error number -105ISAM error: bad isam file format.
After running tbcheck and various tests on the DB it appears that there
is no corruption of the data or indexes.
Environment details:
Informix online 5.00.UC3
Informix 4gl 4.10.UD1
Sunos 4.1.3_U1
Program outline:
declare cursor with hold for
select * from header_table where date < archive_datefor update
foreach
declare cursor with hold for
select * from detail_table
where detail_table.col1 = header_table.col1
and detail_table.col2 = header_table.col2
for update
foreach
insert the record into an archive table
delete the record from the detail_table
where col1 = program record col1
and col2 = program record col2
and col3 = program record col3
end foreach
delete from header_table
where col1 = program variable col1
and col2 = program variable col2
end foreach
Not included in this outline is some code to commit every 1000 records.
Any help would be appreciated.
Peter Strempel
chandos@sydney.dialix.oz.au
Economic and Energy Analysis
Sydney, NSW
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.