"Oliver Stratmann" <st*****@gmx.de> wrote in message news:<bm************@ID-180535.news.uni-berlin.de>...
Hello All!
We have a cursor in an application which fetches some data out of a DB2-DB.
Normally it all works kind of well.
We inserted a routine at certain places in order to do some
perfomance-monitoring .
Now we got the problem, that the cursor closes at some point although not
all the data has been fetched and then next fetch of the application causes
an error.
Is there a way to force the cursor to stay open?
Thanks for your hints or help in advance!
Bye!
Oli
Is the error -501?
When a cursor is openened, it is valid for the package
schema.packageid is was openened in (as can be seen by testing, I do
not know if this behavior is documented): DB2 UDB LUW when processing
the fetch, will look at controlinfo in the package addressed at time
of the fetch. So if a set current packageset has been issued between 2
fetches, and the schema has changed, the fetch will not find his
control info he expects to find in <schema at open cursor
time><packageid> and will return -501 (assuming newschema.packageid
exists, otherwise it will return -805). This is one occurence I know
where a -501 can be returned.
Bernard Dhooghe