ESQL Standard Type Definitions and Conversions
ESQL provides a set of predefined type definitions you can use to define host language variables for date, decimal, and logical table columns. These definitions are in the
proesql.h
header file that comes with your ESQL installation, and provide these data types:
- sqldate
Defines a 13-character variable to hold a date string including the null terminator. The date moved into an sqldate variable for input must be a string in the format "mm/dd/[-]yyyyy" or "dd/mm/[-]yyyyy", depending on the setting of the Date Format (-d) startup parameter at run time.
- sqldec
Defines a 53-character variable to hold a decimal string value: 50 characters for the digits, one for the sign, one for a decimal point, and one for the null terminator.
- sqlbool
Defines a one-character variable to hold a binary value of 0 (Progress FALSE) or 1 (Progress TRUE).
In addition to these standard ESQL data types, you can use a number of the standard C data types. The actual data types you can use for a host variable depends on the SQL data type of the corresponding column or parameter marker, and whether you are using static or dynamic ESQL.
ESQL performs a variety of data conversions depending on the ESQL style you are using. For more information on ESQL data type correspondences and conversions, see "ESQL Data Type Compatibilities."
NOTE: Using the C int data type for host language variables in either static or dynamic ESQL is nonstandard, and the preprocessor flags any instances of it with a warning. Use either short or long.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |