SAP ABAP Class CL_SQL_CONNECTION (Database Connection)
Hierarchy
☛
SAP_BASIS (Software Component) SAP Basis Component
⤷
BC-DB-DBI (Application Component) DB-Independent Database Interface
⤷
SDB_ADBC (Package) ABAP Database Call Interface (Dynamic SQL)
⤷
⤷
Properties
| Class | CL_SQL_CONNECTION | |
| Short Description | Database Connection | |
| Super Class | ||
| Instantiability of a Class | 2 | Public |
| Final |
General Data
| Message Class | ||
| Program status | ||
| Category | 0 | |
| Package | SDB_ADBC | ABAP Database Call Interface (Dynamic SQL) |
| Created | 20001208 | SAP |
| Last change | 20130531 | SAP |
| Shared Memory-enabled | ||
| Fixed point arithmetic | ||
| Unicode checks active |
Forward declarations
Class CL_SQL_CONNECTION has no forward declaration.
Interfaces
Class CL_SQL_CONNECTION has no interface implemented.
Friends
| # | Friend | Modeled only | Created on | Description |
|---|---|---|---|---|
| 1 | CL_SQL_RESULT_SET | 20001208 | Resulting Set of an SQL Query | |
| 2 | CL_SQL_STATEMENT | 20001208 | SQL statement |
Attributes
| # | Attribute | Level | Visibility | Read only | Typing | Associated Type | Initial Value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Instance attribute | Private | Type reference (TYPE) | L_CONDA_T | Connection Descriptor Area | 20001208 | |||
| 2 | Instance attribute | Private | Type reference (TYPE) | DBCON_NAME | Logical name for a database connection | 20001208 | |||
| 3 | Constant | Public | Type reference (TYPE) | DBCON-CON_NAME | 'DEFAULT' | Logical Name of the Default Connection | 20030702 | ||
| 4 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'CT' | Function Code for "COMMIT" | 20030703 | ||
| 5 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'CO' | Function Code for "CONNECT" | 20030703 | ||
| 6 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'DC' | Function Code for "GET DEFAULT CONNECTION" | 20030703 | ||
| 7 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'DI' | Function Code for "DISCONNECT" | 20030703 | ||
| 8 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'GC' | Function Code for "GET CONNECTION" | 20100625 | ||
| 9 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'PG' | Function Code for "PING" | 20030703 | ||
| 10 | Constant | Private | Type reference (TYPE) | L_FCODE_T | 'RB' | Function Code for "ROLLBACK" | 20030703 | ||
| 11 | Instance attribute | Private | Type reference (TYPE) | DBCON_DBMS | Database System | 20010518 | |||
| 12 | Instance attribute | Private | Type reference (TYPE) | FLAG | SPACE | Database Connection Open? | 20030702 | ||
| 13 | Instance attribute | Private | Type reference (TYPE) | FLAG | SPACE | General Flag | 20100625 | ||
| 14 | Instance attribute | Private | Type reference (TYPE) | DBCON-CON_NAME | 'R/3' | Name Used in the Kernel for the Default Connection | 20030702 |
Methods
| # | Method | Level | Visibility | Method type | Description | Created on |
|---|---|---|---|---|---|---|
| 1 | Instance method | Public | Method | Closes an Open Database Connection | 20001208 | |
| 2 | Instance method | Public | Method | Commit the Running Database Transaction | 20001208 | |
| 3 | Instance method | Public | Constructor | Constructor | 20020219 | |
| 4 | Instance method | Public | Method | Creates a Statement Object for this Database Connection | 20001208 | |
| 5 | Static method | Public | Method | Opens a Connection to a Database | 20001208 | |
| 6 | Instance method | Public | Method | Returns the Connection Name Entered in the DBCON | 20010703 | |
| 7 | Instance method | Public | Method | Returns the Type of the Database System | 20020219 | |
| 8 | Instance method | Public | Method | Creates a Metadata Object for This Connection | 20010518 | |
| 9 | Instance method | Public | Method | Checks Whether the Connection is Closed | 20010522 | |
| 10 | Instance method | Public | Method | Checks Whether the Current Database Connection Still Exists | 20030702 | |
| 11 | Instance method | Public | Method | Creates a Prepared Statement Obect | 20001208 | |
| 12 | Instance method | Public | Method | Rollback of the Running Database Transaction | 20001208 | |
| 13 | Instance method | Private | Method | Checks the validity of this connection object | 20100625 |
Events
Class CL_SQL_CONNECTION has no event.
Types
| # | Type | Visibility | Typing | Associated Type | Description | Created on | Type Source |
|---|---|---|---|---|---|---|---|
| 1 | L_CONDA_T | Private | See coding | Connection Descriptor Area in the Kernel | 20001208 | |
|
| 2 | L_FCODE_T | Private | See coding | 20030703 | |
Method Signatures
Method CLOSE Signature
Method CLOSE on class CL_SQL_CONNECTION has no parameter.
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20001208 |
Method COMMIT Signature
Method COMMIT on class CL_SQL_CONNECTION has no parameter.
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20001208 |
Method CONSTRUCTOR Signature
Method CONSTRUCTOR on class CL_SQL_CONNECTION has no parameter.
Method CONSTRUCTOR on class CL_SQL_CONNECTION has no exception.
Method CREATE_STATEMENT Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | STMT_REF | Value transfer | Object reference (TYPE REF TO) | CL_SQL_STATEMENT | Referenz auf eine SQL Statement | 20001208 | |||
| 2 | TAB_NAME_FOR_TRACE | Call by reference | Type reference (TYPE) | TABNAME | Tabellenname | 20120608 |
Method CREATE_STATEMENT on class CL_SQL_CONNECTION has no exception.
Method GET_CONNECTION Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | CON_NAME | Call by reference | Type reference (TYPE) | DBCON_NAME | SPACE | Einstelliges Kennzeichen | 20001208 | ||
| 2 | CON_REF | Value transfer | Object reference (TYPE REF TO) | CL_SQL_CONNECTION | Connection-Objekt | 20001208 | |||
| 3 | SHARABLE | Value transfer | Type reference (TYPE) | FLAG | SPACE | allgemeines flag | 20100625 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20001208 |
Method GET_CON_NAME Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | CON_NAME | Value transfer | Type reference (TYPE) | DBCON_NAME | Logischer Name einer Datenbankverbindung | 20010703 |
Method GET_CON_NAME on class CL_SQL_CONNECTION has no exception.
Method GET_DBMS Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | DBMS | Value transfer | Type reference (TYPE) | DBCON-DBMS | Datenbanksystem | 20020219 |
Method GET_DBMS on class CL_SQL_CONNECTION has no exception.
Method GET_METADATA Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | MD_REF | Value transfer | Object reference (TYPE REF TO) | CL_SQL_METADATA | Methoden zur Beschreibung von DB-Objekten | 20010518 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Oberklasse für Parameterfehler | 20010521 |
Method IS_CLOSED Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IS_CLOSED | Value transfer | Type reference (TYPE) | FLAG | 'X', falls die Verbindung geschlossen ist | 20010522 |
Method IS_CLOSED on class CL_SQL_CONNECTION has no exception.
Method PING Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | PING_OK | Value transfer | Type reference (TYPE) | FLAG | Verbindung ok? | 20030702 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20030702 |
Method PREPARE_STATEMENT Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | PREPSTMT_REF | Value transfer | Object reference (TYPE REF TO) | CL_SQL_PREPARED_STATEMENT | Ein präpariertes SQL Statement | 20001208 | |||
| 2 | STATEMENT | Call by reference | Type reference (TYPE) | STRING | Das zu präparierende SQL Statement | 20001208 | |||
| 3 | TAB_NAME_FOR_TRACE | Call by reference | Type reference (TYPE) | TABNAME | Tabellenname | 20120608 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20001211 |
Method ROLLBACK Signature
Method ROLLBACK on class CL_SQL_CONNECTION has no parameter.
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20001208 |
Method VALIDATE Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | CON_CHANGE_NOT_ALLOWED | Call by reference | Type reference (TYPE) | FLAG | SPACE | allgemeines flag | 20100625 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Ausnahmeklasse für SQL Fehler | 20100625 |
History
| Last changed by/on | SAP | 20130531 |
| SAP Release Created in | 610 |