SQL statements for the database system can be embedded in programming languages such as C and C++. This enables the database system to be accessed from various programs. The values to be retrieved from stored in the database system can be transferred with the SQL statements using parameters. The parameters are declared variables (so-called host variables) within the embedding program.
The data type of the host variables is defined when they are declared in the programming language. If possible, the values of the host variables are implicitly converted from the programming language data type to the data type of the database system, and vice versa.
Each parameter can be combined with an indicator variable that indicates irregularities which may have occurred when the values were assigned, for example, different value and parameter lengths,
NULL value, special NULL value, etc. Indicator variables are essential for transferring NULL values and special NULL values. The indicator variables are declared as variables in the embedding program.See also:
Parameter name Indicator name