Tony Tyrwhitt-Drake wrote:
>
> Mark Stevans wrote in message <34EA08B8.4CBEF655@dnai.com>...
> >Hi. I'm programming in ESQL/C on Solaris for Informix 7.12. After my
> >"CONNECT" statement, I issue the statement "SET LOCK MODE TO WAIT", and
> >then my app does lots of "INSERT" operations. No problem when I run the
> >app alone.
> >
> >But when I try to run multiple copies of my app concurrently, once in a
> >while the "INSERT" fails, returning SQLSTATE "IX000", SQLCODE -271
> >within a second of real time of when the "INSERT" was initiated. The
> >exception messages fetched are "Could not insert new row into the table"
> >and "ISAM error: key value locked".
> >
>
> "Set lock mode to wait " has no effect with respect to exclusive locks. If
> your process encounters an exclusive lock it will take the error exit
> provided and slam the door on the way out.
>
[cutting]
Sorry, but I disagree the type of lock is irrelevant if 'lock mode to
wait' is working correctly then the process should wait forever. If is
it is set to a value then the process should wait until that time
elapses. It is my understanding that the engine will keep retrying the
row during the time period, at what resolution I don't know (somebody
will no doubt tell me:-) ).
There is/was problems with 'set lock mode to wait' not working correctly
under some 7.1x releases, but setting it to a definite value resolved
it.
--
Paul Watson #
WF Software Ltd # It said run using Windows 95
Tel: +44 1436 674629 # or better in the manual
Fax: +44 1436 678693 # so I used Unix
www.wfsoftware.co.uk #