Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere embedded SQL » The SQL descriptor area (SQLDA) » SQLDA sqllen field values

 

Sending values

The following table indicates how you specify lengths of values when you supply data to the database server in the SQLDA.

Only the data types displayed in the table are allowed in this case. The DT_DATE, DT_TIME, and DT_TIMESTAMP types are treated the same as DT_STRING when supplying information to the database; the value must be a null-terminated character string in an appropriate date format.

Embedded SQL data type Program action to set the length
DT_BIGINT No action required.
DT_BINARY(n) Length taken from field in BINARY structure.
DT_BIT No action required.
DT_DATE Length determined by terminating \0.
DT_DOUBLE No action required.
DT_FIXCHAR(n) Length field in SQLDA determines length of string.
DT_FLOAT No action required.
DT_INT No action required.
DT_LONGBINARY Length field ignored. See Sending LONG data.
DT_LONGNVARCHAR Length field ignored. See Sending LONG data.
DT_LONGVARCHAR Length field ignored. See Sending LONG data.
DT_NFIXCHAR(n) Length field in SQLDA determines length of string.
DT_NSTRING Length determined by terminating \0. If the ansi_blanks option is On and the database is blank-padded, then the length field in the SQLDA must be set to the length of the buffer containing the value (at least the length of the value plus space for the terminating null character).
DT_NVARCHAR Length taken from field in NVARCHAR structure.
DT_SMALLINT No action required.
DT_STRING Length determined by terminating \0. If the ansi_blanks option is On and the database is blank-padded, then the length field in the SQLDA must be set to the length of the buffer containing the value (at least the length of the value plus space for the terminating null character).
DT_TIME Length determined by terminating \0.
DT_TIMESTAMP Length determined by terminating \0.
DT_TIMESTAMP_STRUCT No action required.
DT_UNSBIGINT No action required.
DT_UNSINT No action required.
DT_UNSSMALLINT No action required.
DT_VARCHAR(n) Length taken from field in VARCHAR structure.
DT_VARIABLE Length determined by terminating \0.