2009-11-11 SQLServer: Fixed bug with unsigned 32-bit integer parameters (thanks Kyle Stock).SQLServer: Fixed problem with [n]varchar|varbinary(max) output parameters (thanks Alfred Gebert).
SQLServer: Fixed bug with SAParam::setAsBool method (thanks Jacob Pedersen). Use attached diff file for 3.7.29 sources patching. -- Best regards, Sergey Chumakov, SQLAPI++ development team
*** ssOleDbClient.cpp Fri Jul 24 09:53:06 2009 --- C:\SQLAPI_3.7.29\src\ssOleDbClient.cpp Wed Nov 11 08:42:15 2009 *************** *** 654,660 **** wType = DBTYPE_I4; // 4-byte signed integer break; case SA_dtULong: ! wType = DBTYPE_UI4; // 4-byte unsigned integer break; case SA_dtDouble: wType = DBTYPE_R8; // 8-byte floating-point data --- 654,660 ---- wType = DBTYPE_I4; // 4-byte signed integer break; case SA_dtULong: ! wType = DBTYPE_I8; // !!! 8-byte integer !!! break; case SA_dtDouble: wType = DBTYPE_R8; // 8-byte floating-point data *************** *** 2435,2450 **** dbbinding.bScale = 0; if(isLongOrLob(eDataType)) - { wTypeIn |= DBTYPE_BYREF; - wTypeOut |= DBTYPE_BYREF; - } if( pBindAll[iBind] == pBindIn ) { dbbinding.eParamIO = DBPARAMIO_INPUT; // 2009-04-14: The code below helps with data truncation when ICommandPrepare = skip is used ! if( NULL != pBindOut ) dbbinding.eParamIO |= DBPARAMIO_OUTPUT; } else if( pBindAll[iBind] == pBindOut ) --- 2435,2447 ---- dbbinding.bScale = 0; if(isLongOrLob(eDataType)) wTypeIn |= DBTYPE_BYREF; if( pBindAll[iBind] == pBindIn ) { dbbinding.eParamIO = DBPARAMIO_INPUT; // 2009-04-14: The code below helps with data truncation when ICommandPrepare = skip is used ! if( NULL != pBindOut && ! isLongOrLob(eDataType) ) dbbinding.eParamIO |= DBPARAMIO_OUTPUT; } else if( pBindAll[iBind] == pBindOut ) *************** *** 2501,2507 **** IDS_UNKNOWN_PARAMETER_TYPE, (const SAChar*)Param.Name()); case SA_dtBool: assert(*pobLength == sizeof(VARIANT_BOOL)); ! *(VARIANT_BOOL*)pobValue = (VARIANT_BOOL)Param.asBool(); break; case SA_dtShort: assert(*pobLength == sizeof(short)); --- 2498,2504 ---- IDS_UNKNOWN_PARAMETER_TYPE, (const SAChar*)Param.Name()); case SA_dtBool: assert(*pobLength == sizeof(VARIANT_BOOL)); ! *(VARIANT_BOOL*)pobValue = Param.asBool() ? VARIANT_TRUE:VARIANT_FALSE; break; case SA_dtShort: assert(*pobLength == sizeof(short)); *************** *** 2516,2523 **** *(long*)pobValue = Param.asLong(); break; case SA_dtULong: ! assert(*pobLength == sizeof(unsigned long)); ! *(unsigned long*)pobValue = Param.asLong(); break; case SA_dtDouble: assert(*pobLength == sizeof(double)); --- 2513,2520 ---- *(long*)pobValue = Param.asLong(); break; case SA_dtULong: ! assert(*pobLength == sizeof(sa_int64_t)); ! *(sa_int64_t*)pobValue = Param.asULong(); break; case SA_dtDouble: assert(*pobLength == sizeof(double)); *************** *** 3111,3116 **** --- 3108,3115 ---- { case SA_dtBool: return sizeof(VARIANT_BOOL); + case SA_dtULong: + return sizeof(sa_int64_t); case SA_dtNumeric: return sizeof(DB_NUMERIC); case SA_dtDateTime: