Was this helpful?
Like BASIC statements, Embedded SQL statements can have a label prefix. The label must begin with an alphabetic character and the remaining characters, if present, can be any combination of alphabetic and numeric characters and underscores. Note that dollar signs ($) and periods (.) are not permitted in labels preceding Embedded SQL statements, even though the BASIC compiler accepts these characters. The label must be separated from the statement it labels with a colon. For example:
Close_Csr: exec sql close cursor1
The label can appear before any Embedded SQL statement. As with line numbers, in most instances the preprocessor outputs any BASIC label that precedes an Embedded SQL statement. However, in a few cases the preprocessor ignores a BASIC label and does not include it in the code it generates. For example, the preprocessor ignores labels occurring on Embedded SQL statements that do not produce BASIC code. It is an error to put a label on a continuation line for an Embedded SQL statement.
A label can be preceded by a BASIC line number. For example:
100        Close_down:    exec sql disconnect
Last modified date: 06/10/2024