Skip to content

Commit eab7866

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 5da259d commit eab7866

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

driver/queries.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,13 +2426,16 @@ SQLRETURN EsSQLColAttributeW(
24262426
case SQL_DESC_CONCISE_TYPE: sint = rec->concise_type; break;
24272427
case SQL_DESC_TYPE: sint = rec->type; break;
24282428
case SQL_DESC_UNNAMED: sint = rec->unnamed; break;
2429+
case SQL_COLUMN_NULLABLE: /* 2.x attrib; no break */
24292430
case SQL_DESC_NULLABLE: sint = rec->es_type->nullable; break;
24302431
case SQL_DESC_SEARCHABLE: sint = rec->es_type->searchable; break;
24312432
case SQL_DESC_UNSIGNED: sint = rec->es_type->unsigned_attribute; break;
24322433
case SQL_DESC_UPDATABLE: sint = rec->updatable; break;
2434+
case SQL_COLUMN_PRECISION: /* 2.x attrib; no break */
24332435
case SQL_DESC_PRECISION:
24342436
sint = rec->es_type->fixed_prec_scale;
24352437
break;
2438+
case SQL_COLUMN_SCALE: /* 2.x attrib; no break */
24362439
case SQL_DESC_SCALE:
24372440
sint = rec->es_type->maximum_scale;
24382441
break;
@@ -2449,6 +2452,7 @@ SQLRETURN EsSQLColAttributeW(
24492452
case SQL_DESC_LABEL: wstrp = &rec->label; break;
24502453
case SQL_DESC_BASE_TABLE_NAME: wstrp = &rec->base_table_name; break;
24512454
case SQL_DESC_CATALOG_NAME: wstrp = &rec->catalog_name; break;
2455+
case SQL_COLUMN_NAME: /* 2.x attrib; no break */
24522456
case SQL_DESC_NAME: wstrp = &rec->name; break;
24532457
case SQL_DESC_SCHEMA_NAME: wstrp = &rec->schema_name; break;
24542458
case SQL_DESC_TABLE_NAME: wstrp = &rec->table_name; break;
@@ -2470,6 +2474,7 @@ SQLRETURN EsSQLColAttributeW(
24702474
/* SQLLEN */
24712475
do {
24722476
case SQL_DESC_DISPLAY_SIZE: len = rec->es_type->display_size; break;
2477+
case SQL_COLUMN_LENGTH: /* 2.x attrib; no break */
24732478
case SQL_DESC_OCTET_LENGTH: len = rec->octet_length; break;
24742479
} while (0);
24752480
PNUMATTR_ASSIGN(SQLLEN, len);

0 commit comments

Comments
 (0)