GET DESCRIPTOR Statement [ESQL]

Retrieves information about variables within a descriptor area, or retrieves actual data from a variable in a descriptor area.

Quick Links:

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

GET DESCRIPTOR descriptor-name...hostvar = COUNT } | VALUE n assignment [,…] }

assignment
   hostvar = { TYPE 
   | LENGTH 
   | PRECISION 
   | SCALE 
   | DATA 
   | INDICATOR 
   | NAME 
   | NULLABLE 
   | RETURNED_LENGTH }

Examples

(back to top)

Usage

(back to top)

The value n specifies the variable in the descriptor area about which information is retrieved.

Type checking is performed when doing GET DESCRIPTOR ... DATA to ensure that the host variable and the descriptor variable have the same data type. LONG VARCHAR and LONG BINARY are not supported by GET DESCRIPTOR ... DATA.

If an error occurs, it is returned in the SQLCA.

Standards

(back to top)

  • SQL—ISO/ANSI SQL compliant.
  • SAP Sybase Database product—Supported by Open Client/Open Server.

Permissions

(back to top)

None

Related reference
ALLOCATE DESCRIPTOR Statement [ESQL]
DEALLOCATE DESCRIPTOR Statement [ESQL]
SET DESCRIPTOR Statement [ESQL]