6. Embedded SQL for BASIC : Preprocessor Operation : Coding Requirements for Embedded SQL Programs : Embedded Statements Inside BASIC If Blocks
 
Share this page                  
Embedded Statements Inside BASIC If Blocks
As mentioned above, the preprocessor never generates line numbers on its own. Therefore, you can enclose Embedded SQL statements in the then or else clause of a BASIC if statement without changing program control. For example:
if (error = 1) then
        exec sql message 'Error on update'
        exec sql sleep 2
end if