ROWID host variables in C and C++ applications that use SQL

C and C++ do not have a variable that corresponds to the SQL data type ROWID. To create host variables that can be used with this data type, use the SQL TYPE IS clause. The SQL precompiler replaces this declaration with a C language structure in the output source member.

ROWID

Read syntax diagramSkip visual syntax diagram
                      .-,-------------.        
                      V               |        
>>-SQL TYPE IS ROWID----variable-name-+-- ; -------------------><

Note: SQL TYPE IS ROWID can be in mixed case.

ROWID Example

The following declaration:

SQL TYPE IS ROWID myrowid, myrowid2;

Results in the generation of the following structure:

_Packed struct { short len;
                 char data[40];}
myrowid1, myrowid2;