Skip to main content


Showing posts from June, 2008

Ingres resource limiting : Part3 (inquire_ingres)

The other option left was to capture the error from inside the 4GL code by checking the inquire_ingres error number after each sql statement (which does already,but I had to tweak it to also check for the specific error) and act upon it. Since all code is grouped in frskeys (meaning that the user must press a key for the code to be activated) the whole error handling had to be shifted inside the frskey code. Inside the frskey code there can be multiple sql statements and each one can trigger the exception.It might not be the first or second statement but it could be the 5th statement in the chain of execution. Furthermore the 'set maxio' directive is the first statement to be executed when the key is pressed,and must reset back to 'set nomaxio' on exiting or one of the conditions described later are met. So every sql statement must be checked and the following was added after each one: inquire_ingres (h_rowcount=rowcount,h_errorno=errorno,h_querytext=querytext

Ingres resource limiting : Part2 (Ingres resource limiter 'maxio')

There was a suggestion to use the resource limiter (set maxio) as to capture and handle the exception thrown when the threshold is reached. That was a great suggestion but soon discovered several limitations as far as ABF-4GL goes (reports cannot use it) : In my topframe I am setting the maxio to a threshold value by using the 'set maxio' directive and I programm my errorhandler using iiseterr() to trap the error issued when that threshold is reached. But,as the manual states, 'Your error-handling routine must not issue any database statements in the same session in which the error occurred. If it is necessary to issue database statements in an error handler, open or switch to another session' OR 'Do not issue any query statements from inside your error handler routine because the application occasionally "hangs" or returns runtime errors.' OR 'User code in the handler cannot issue database statements for the session from which the handler was