I'm not experienced in db2, but I have to write some rather complex
processing with stored procedures for db2 on as400.
The database consists of some twenty tables and is prepared in advance
so it does not change, while I run my procedures. I call the
procedures over ODBC from a Microsoft Access and Microsoft Windows
client. The procedures also doesn't write anything into this database,
but all the output goes into "global temporary tables". At the end the
results are sent over ODBC to the client. There are also other users
working on the same database at the same time. I don't know how many
of them and what they do, but it is sure, that they don't change the
data in the tables as well.
Now the problem is, that I sometimes get different results from one
run to another although the database is not changend in the
meantime. The database is changed only over the night.
Is it possible, that someone locks some data and my procedures
silently skips such data without raising any expcetion? I didn't give
any special options in may SQL. I also didn't write any code to catch
the exceptions, so they would stop the program, if they occured.
The processing is rather lenghty, about half an hour, and the error
happens so rarely that I'm quite in a despair to catch it by trial and
error.
Maks Romih