Re: Error 240???
Posted in 1996
In article <4f0fqc$pbl@newsbf02.news.aol.com>, mehering@aol.comy says...
>I try the following:
>
>DELETE FROM foo WHERE status_code = <some constant. e.g. 'S','V', etc.>;>
>I get...
>240: Could not delete a row.
>121: ISAM Error: Cannot write log record.
Someone else suggested a solution that looked an awful lot like a 4GL
solution. If you don't have 4GL, might I suggest something along the lines of
the following:
OUTPUT to PIPE "isql databasename -" WITHOUT HEADINGS
SELECT "delete from foo where foo.primary_key = ", foo.primary_key, ";"
FROM foo
WHERE foo condition1 AND foo condition2;
I have not done this for a while; the exact syntax may not be correct, but it
is a way to get it done. You can arbitrarily select literal strings
containing the commands you want and pass that along to the SQL interpreter,
and each delete statement will be in its own small transaction rather than the
large transaction that would occur if you issued the delete statement
directly.
This works with ISQL 4.11 and Informix-Online 5.03; hopefully it works
similarly with Informix-SE.
--
William Harris william@carsinfo.com
CARS Information Systems
4000 Executive Park Drive
Cincinnati, OH (USA) 45241