Previous Topic

Next Topic

Introduction

This chapter describes connection management statements in ESQL and discusses the following statements that can be used in an ESQL program:

  • CONNECT
  • SET CONNECTION
  • DISCONNECT

The ESQL statements in an ESQL program are used to access and manipulate data in a database. In order to access/manipulate the database, it is necessary to have a valid connection with the database. This accessibility is managed by using the connection management statements. Connection management statements can be used to make a connection to a database, set an existing connection as current or to drop an existing connection. The following are the connection management statements in ESQL:

  • CONNECT - Enables an ESQL application to establish a connection with a database. The database specified by the CONNECT statement becomes the current connection.
  • SET CONNECTION - Allows the application to make a particular database connection current.
  • DISCONNECT - Terminates the connection between an application and the associated database.

Note: The database must be started successfully before an ESQL program can connect to it.