http://git-wip-us.apache.org/repos/asf/trafodion/blob/2822a389/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafodion/blob/2822a389/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
----------------------------------------------------------------------
diff --cc win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
index a6a5b7b,1d338b6..e603708
--- a/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
+++ b/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
@@@ -276,6 -276,23 +276,19 @@@ unsigned long ODBC::ConvertCToSQL(SQLIN
        if (errorMsg)
                *errorMsg = '\0';
  
+     if (SQLDataType == SQLTYPECODE_BLOB || SQLDataType == SQLTYPECODE_CLOB)
+     {
+         SQLINTEGER lob_len;
+         if (srcLength == SQL_NTS)
+             lob_len = strlen((const char *)srcDataPtr);
+         else
+             lob_len = srcLength;
+         memcpy((char *)targetDataPtr, &lob_len, sizeof(lob_len));
+         memcpy((char *)targetDataPtr + 4, (const char *)srcDataPtr, 
targetLength > srcLength ? srcLength : targetLength);
+         return SQL_SUCCESS;
+     }
+       
 -      //if (targetPrecision < 19)
 -    if (((SQLDataType == SQLTYPECODE_NUMERIC) && (targetPrecision <= 18)) ||
 -        ((SQLDataType == SQLTYPECODE_NUMERIC_UNSIGNED) && (targetPrecision <= 
9)))
 -              getMaxNum(targetPrecision, targetScale, integralMax, 
decimalMax);
+ 
        switch (ODBCDataType)
        {
        case SQL_VARCHAR:

Reply via email to