com.HTTPRequest.setKeepConnection

Defines whether a connection is kept open if a new request occurs.

Syntax

setKeepConnection(
   keep INTEGER )
  1. keep defines if the connection is kept.

Usage

The setKeepConnection() method defines whether the connection stays open when a new HTTP request occurs.

The default is FALSE.

Note: If the server uses the Windows® NT (New Technology) LAN Manager (NTLM) protocol, authentication requires the request to keep the connection open via a call to setKeepConnection(TRUE), otherwise authentication will fail.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).