The timeout interval

With the sqlbreakcallback() function, you specify a timeout interval.

A timeout interval is the amount of time (in milliseconds) for which the database server can process an SQL request before the application regains control. The application then calls the callback function that you specify and executes it to completion.

After the callback function completes, the application resumes its wait until one of the following actions take place:
  • The database server returns control to the application under one of the following conditions:
    • It has completed the SQL request. The database server returns the status of the request in the SQLCODE and SQLSTATE variables.
    • It has discontinued processing of the SQL request because it has received an interrupt request from the sqlbreak() function in the callback function. For more information about how the database server responds to sqlbreak(), see Database server control functions.
  • The next timeout interval elapses. When the application resumes execution, it calls the callback function again.

    The application calls the callback function each time the timeout interval elapses until the database server completes the request or is interrupted.