Skip to content

Commit eb64e15

Browse files
committed
WIP odbc: Try to convert BCP data better
1 parent d999b73 commit eb64e15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/odbc/bcp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ _tdsodbc_dbconvert(TDS_DBC *dbc, int srctype, const TDS_CHAR * src, SQLLEN src_l
527527
break;
528528
case SYBCHAR:
529529
case SYBVARCHAR:
530+
case XSYBCHAR:
531+
case XSYBVARCHAR:
530532
case SYBTEXT:
531533
ret = (TDS_INT) _bcp_iconv_helper(dbc, bindcol, dres.c, len, (char *) dest, destlen);
532534
free(dres.c);
@@ -605,7 +607,7 @@ _bcp_get_col_data(TDSBCPINFO *bcpinfo, TDSCOLUMN *bindcol, int offset TDS_UNUSED
605607
col_len = bindcol->column_bindlen;
606608
}
607609

608-
desttype = tds_get_conversion_type(bindcol->column_type, bindcol->column_size);
610+
desttype = tds_get_conversion_type(bindcol->on_server.column_type, bindcol->on_server.column_size);
609611

610612
/* Fixed Length data - this overrides anything else specified */
611613
coltype = bindcol->column_bindtype == 0 ? desttype : (TDS_SERVER_TYPE) bindcol->column_bindtype;

0 commit comments

Comments
 (0)