Contents IndexEmbedded SQL development Host variables

User's Guide
   Part V. The SQL Anywhere Programming Interfaces
     Chapter 34. The Embedded SQL Interface
      Embedded SQL interface data types

In order to transfer information between a program and the database engine, every piece of data must have a data type. The Embedded SQL data type constants (prefixed with DT_) can be found in the SQLDEF.H header file (see "SQLDEF.H header file"). You can create a host variable (next section) of any one of the supported types. You can also use these types in an SQLDA structure for passing data to and from the database.

The following data types are supported by the Embedded SQL programming interface:

The structures are defined in the SQLCA.H file. The VARCHAR, BINARY and DECIMAL types contain a one-character array and are thus not useful for declaring host variables but they are useful for allocating variables dynamically or typecasting other variables.

DATE and TIME database types

There are no corresponding Embedded SQL interface data types for the various DATE and TIME database types. These database types are all fetched and updated using either the SQLDATETIME structure or character strings.

There are no Embedded SQL interface data types for LONG VARCHAR and LONG BINARY database types. These database types are fetched and updated in pieces. For more information see "GET DATA statement" and "SET statement".

Contents IndexEmbedded SQL development Host variables