A script-enabled browser is required for this page to function properly.

EXEC_SQL.Open_Connection

Description

Syntax


FUNCTION EXEC_SQL.Open_Connection
    (Username     IN VARCHAR2,
     Password     IN VARCHAR2,
     Data source  IN VARCHAR2)
RETURN EXEC_SQL.ConnType;

Parameters

Parameter Description
Connstr Is a string in the form 'User[/Password][@database_string]'
Username A string specifying the user name used to connect to the database
Password A string specifying the password for the user name
Data source Either a string specifying the SQLNet alias or the OCA connection starting with 'ODBC:'

Returns

A handle to the new database connection.

Example


PROCEDURE getData IS
  --
  -- a connection handle must have a datatype of EXEC_SQL.conntype
  --
  connection_id EXEC_SQL.CONNTYPE;

  ...

BEGIN
  --
  -- a connection string is typically of the form 'username/password@database_alias'
  --
  connection_id := EXEC_SQL.OPEN_CONNECTION('connection_string');  

  ...

END;