Changeset: 33444207f408 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/33444207f408
Modified Files:
        clients/odbc/driver/ODBCConvert.c
Branch: Mar2025
Log Message:

When converting decimals to SQL_C_CHAR, just use the data from the server.


diffs (21 lines):

diff --git a/clients/odbc/driver/ODBCConvert.c 
b/clients/odbc/driver/ODBCConvert.c
--- a/clients/odbc/driver/ODBCConvert.c
+++ b/clients/odbc/driver/ODBCConvert.c
@@ -1308,6 +1308,8 @@ ODBCFetch(ODBCStmt *stmt,
                case SQL_INTEGER:
                case SQL_BIGINT:
                case SQL_HUGEINT:
+               case SQL_DECIMAL:
+               case SQL_NUMERIC:
                        sz = snprintf((char *) ptr, buflen, "%s", data);
                        if (sz < 0 || sz >= buflen) {
                                /* Numeric value out of range */
@@ -1320,8 +1322,6 @@ ODBCFetch(ODBCStmt *stmt,
                        if (lenp)
                                *lenp = sz;
                        break;
-               case SQL_DECIMAL:
-               case SQL_NUMERIC:
                case SQL_BIT: {
                        uint64_t f;
                        int n;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to