Skip to main content

Problem:

Does the SET OPTION QUERYTIME option affect all queries executed on a connection or only those in the same COBOL module?

What is the minimum value that can be used?

Resolution:

If SET OPTION QUERYTIME is specified, it is used for all subsequent SQL operations within that thread, hence any subprograms will effectively inherit that setting. This is also true if you have multiple connections within a single application thread.

The option passed to QUERYTIME specifies the number of seconds that the program waits for a response to an OpenESQL statement.

According to SQL Server documentation, the minimum value is 0, which means no timeout, but the lowest timeout is 1 second.

Old KB# 6919