Skip to content

Commit c18318d

Browse files
committed
SQLColAttribute: add bwc attributes for 2.x (#205)
Add the backwards compatibility attributes required by 2.x applications that are not translated by the DriverManager. (cherry picked from commit 6a14b2a)
1 parent df559d1 commit c18318d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

driver/queries.c

+5
Original file line numberDiff line numberDiff line change
@@ -3837,13 +3837,16 @@ SQLRETURN EsSQLColAttributeW(
38373837
case SQL_DESC_CONCISE_TYPE: sint = rec->concise_type; break;
38383838
case SQL_DESC_TYPE: sint = rec->type; break;
38393839
case SQL_DESC_UNNAMED: sint = rec->unnamed; break;
3840+
case SQL_COLUMN_NULLABLE: /* 2.x attrib; no break */
38403841
case SQL_DESC_NULLABLE: sint = rec->es_type->nullable; break;
38413842
case SQL_DESC_SEARCHABLE: sint = rec->es_type->searchable; break;
38423843
case SQL_DESC_UNSIGNED: sint = rec->es_type->unsigned_attribute; break;
38433844
case SQL_DESC_UPDATABLE: sint = rec->updatable; break;
3845+
case SQL_COLUMN_PRECISION: /* 2.x attrib; no break */
38443846
case SQL_DESC_PRECISION:
38453847
sint = rec->es_type->fixed_prec_scale;
38463848
break;
3849+
case SQL_COLUMN_SCALE: /* 2.x attrib; no break */
38473850
case SQL_DESC_SCALE:
38483851
sint = rec->es_type->maximum_scale;
38493852
break;
@@ -3860,6 +3863,7 @@ SQLRETURN EsSQLColAttributeW(
38603863
case SQL_DESC_LABEL: wstrp = &rec->label; break;
38613864
case SQL_DESC_BASE_TABLE_NAME: wstrp = &rec->base_table_name; break;
38623865
case SQL_DESC_CATALOG_NAME: wstrp = &rec->catalog_name; break;
3866+
case SQL_COLUMN_NAME: /* 2.x attrib; no break */
38633867
case SQL_DESC_NAME: wstrp = &rec->name; break;
38643868
case SQL_DESC_SCHEMA_NAME: wstrp = &rec->schema_name; break;
38653869
case SQL_DESC_TABLE_NAME: wstrp = &rec->table_name; break;
@@ -3881,6 +3885,7 @@ SQLRETURN EsSQLColAttributeW(
38813885
/* SQLLEN */
38823886
do {
38833887
case SQL_DESC_DISPLAY_SIZE: len = rec->es_type->display_size; break;
3888+
case SQL_COLUMN_LENGTH: /* 2.x attrib; no break */
38843889
case SQL_DESC_OCTET_LENGTH: len = rec->octet_length; break;
38853890
} while (0);
38863891
PNUMATTR_ASSIGN(SQLLEN, len);

0 commit comments

Comments
 (0)