type
is the user-defined datatype to be equivalenced with an Oracle7 external datatype.
datatype
is an Oracle7 external datatype recognized by the Oracle Precompilers (not an Oracle7 internal datatype). The datatype may include a length, precision, or scale. This external datatype is equivalenced to the user-defined type and assigned to all host variables assigned the type. For a list of external datatypes, see Programmer's Guide to the Oracle Precompilers.
All Oracle Precompilers also support the embedded SQL VAR command for host variable equivalencing.
Example I
This example shows an embedded SQL TYPE statement in a Pro*C Precompiler program:
struct screen {short len; char buff[4002]; }; typedef struct screen graphics; EXEC SQL BEGIN DECLARE SECTION; EXEC SQL TYPE graphics IS VARRAW (4002); graphics crt; -- host variable of type graphics ... EXEC SQL END DECLARE SECTION;
Example II
This example shows an embedded SQL TYPE statement in a Pro*Pascal Precompiler program:
Type OraDate = Record Cent, Year, Month, Day, Hour, Min, Sec: Byte End; Var EXEC SQL BEGIN DECLARE SECTION; EXEC SQL TYPE OraDate IS DATE; Birthday: OraDate; -- host variable of type OraDate ... EXEC SQL END DECLARE SECTION;