September 7th, 2009
Host Programs, C and C++
Posted by
admin in
S. Host Programs
Syntax Element In C and C++ prefix EXEC SQL terminator ; target label
Variable Definition Syntax
C and C++ variable definition =
[auto | extern | static] [const | volatile]
C numeric variable | C character variable
| C derived variable;
C and C++ numeric variable =
{long | short | float | double}
{variable name [initial value] }.,..
C and C++ character variable =
char [CHARACTER SET [IS] character set name]
{variable name {length} [initial value] }.,..
C and C++ derived variable =
{ VARCHAR [CHARACTER SET [IS] character set name]
{variable name {length} [= character representation... ] }.,..} |
{ BIT{variable name {length} [= character representation... ] }.,..}
The length is the fixed length or the maximum varying length of the string, and the character representation sequence is an optional initial value.
SQL Type C and C++ Type BIGINT long long CHAR(1) char CHAR(n) char(n+1) CLOB(n) clob(n) DATE char(11) with null-terminator DOUBLE double INTEGER long int REAL float SMALLINT short int TIME char(9) with null-terminator TIMESTAMP char(27) with null-terminator VARCHAR(n) char[n+1] SQLCODE long SQLSTATE char 6 indicator short or long