Mimer Specific Descriptor Fields
Mimer SQL supports large objects of up to 8 terabytes. This poses a problem to ODBC applications since the ODBC API specifies length fields to be 32 bits. An ODBC compliant application is therefore unable to work with any objects larger than 2 gigabytes. The SQL/CLI standard has the same problem, so we won't get much help there.
To remedy this situation, the Mimer ODBC driver has four vendor specific descriptor attributes. Each attribute mimics the behavior of an existing attribute, the only difference is that the existing attribute is working with a 32-bit integer while ours use 64-bit integers.
C-definitions for these attributes are available in the
mimodbc.hheader file. Include this file along with the regular ODBC include files (
sqlext.h) to gain access to these features.
Note that, although these attributes are most useful when working with large objects, they may be used for any type of data.The Mimer specific descriptor attributes:
ARD: Null ptr
APD: Null ptr
SQLBIGINTrecord field contains the maximum number of characters required to display the data from the column. The value in this field is not the same as the descriptor field
SQL_DESC_LENGTHfield is undefined for all numeric types.
SQL_DESC_LENGTH_64 [Implementation descriptors]
SQLUBIGINTrecord field is either the maximum or actual character length of a character string or a binary data type. It is the maximum character length for a fixed-length data type, or the actual character length for a variable-length data type. Its value always excludes the null-termination character that ends the character string. For values whose type is
SQL_TYPE_TIMESTAMP, or one of the SQL interval data types, this field has the length in characters of the character string representation of the datetime or interval value. Note that this field is a count of characters, not a count of bytes.
The value in this field may be different from the value for "length" as defined in ODBC 2.x. For more information, see Microsoft ODBC 3.0 Programmer's Reference, Appendix D, "Data Types."
SQL_DESC_OCTET_LENGTH_64 [Implementation descriptors]
SQLBIGINTrecord field contains the length, in bytes, of a character string or binary data type. For fixed-length character or binary types, this is the actual length in bytes. For variable-length character or binary types, this is the maximum length in bytes. This value always excludes space for the null-termination character.
SQL_DESC_OCTET_LENGTH_PTR_64 [Application descriptors]
SQLBIGINT*record field points to a variable that will contain the total length in bytes of a dynamic argument (for parameter descriptors) or of a bound column value (for row descriptors).
For an APD, this value is ignored for all arguments except character string and binary; if this field points to
SQL_NTS, the dynamic argument must be null-terminated. To indicate that a bound parameter will be a data-at-execution parameter, an application sets this field in the appropriate record of the APD to a variable that, at execute time, will contain the value
SQL_DATA_AT_EXECor the result of the
SQL_LEN_DATA_AT_EXECmacro. If there is more than one such field,
SQL_DESC_DATA_PTRcan be set to a value uniquely identifying the parameter to help the application determine which parameter is being requested.
OCTET_LENGTH_PTR_64field of an ARD is a null pointer, the driver does not return length information for the column. When setting the
SQL_DESC_OCTET_LENGTH_PTR_64field to anything other than a null pointer, this field overrides the
SQL_DESC_OCTET_LENGTH_PTRfield. When both
SQL_DESC_OCTET_LENGTH_PTR_64are set to null pointers the driver assumes that character strings and binary values are null-terminated. (Binary values should not be null-terminated, but should be given a length to avoid truncation.)
If the call to
SQLFetchScrollthat fills in the buffer pointed to by this field did not return
SQL_SUCCESS_WITH_INFO, the buffer contents are undefined. This field is a deferred field: It is not used at the time it is set, but is used at a later time by the driver to determine or indicate the octet length of the data.
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40