Set up a timeout interval

When the database server processes a large query, you might want to prompt the user periodically to determine whether to continue the request.

To do this, you can use the sqlbreakcallback() function to provide the following information:
  • A timeout interval is the period to wait for an SQL request to execute before the application regains control.
  • A callback function is the user-defined function to call each time the timeout interval has elapsed.
Restriction: Do not use the sqlbreakcallback() function if your HCL OneDB™ ESQL/C application uses shared memory (onipcshm) as the nettype in a connection to an instance of the database server. Shared memory is not a true network protocol and does not handle the nonblocking I/O that support for a callback function requires. When you use sqlbreakcallback() with shared memory, the function call appears to register the callback function successfully (it returns zero), but during SQL requests, the application never calls the callback function.