SET CONNECTION Statement [ESQL] [Interactive SQL]

Changes the active database connection.

Quick Links:

Go to Parameters

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

SET CONNECTION [connection-name]

Parameters

(back to top)

Examples

(back to top)

Usage

(back to top)

The current connection state is saved and is resumed when it again becomes the active connection. If connection-name is omitted and there is a connection that was not named, that connection becomes the active connection.

Note: When cursors are opened in Embedded SQL, they are associated with the current connection. When the connection is changed, the cursor names are not accessible. The cursors remain active and in position and become accessible when the associated connection becomes active again.

Standards

(back to top)

  • SQL— dbisql use is a vendor extension to ISO/ANSI SQL grammar. Embedded SQL is a full-level feature.
  • SAP Sybase Database product—Supported by Open Client/Open Server.

Permissions

(back to top)

None

Related reference
CONNECT Statement [ESQL] [Interactive SQL]
DISCONNECT Statement [Interactive SQL]