[sqlapi-announce] SQLAPI++ 3.7.22 SQLServer (OLEDB) bug fixed at IssOleDbCursor::SetParameterInfo

  • From: Sergey Chumakov <support@xxxxxxxxxx>
  • To: sqlapi-announce@xxxxxxxxxxxxx
  • Date: Tue, 28 Aug 2007 09:31:11 +0300

Hi All,

IssOleDbCursor::SetParameterInfo uses "DBTYPE_BYTES" string with ICommandWithParameter::SetParameterInfo when "DBTYPE_VARBINARY", or
"DBTYPE_LONGVARBINARY" should be there.

The patch is attached. Thanks to Phillip at spectorsoft.com

--
Best regards,
Sergey Chumakov, SQLAPI++ development team









--- ssOleDbClient.cpp   14 Jun 2007 17:10:00 -0000      1.33
+++ ssOleDbClient.cpp   21 Aug 2007 09:02:29 -0000      1.35
@@ -1773,11 +1773,16 @@
                        break;
                case DBTYPE_BYTES:
                        if( isLongOrLob(eDataType) )
+                       {
                                pParamBindInfo[i].ulParamSize |= ~0;
+                               pParamBindInfo[i].pwszDataSourceType = 
L"DBTYPE_LONGVARBINARY";
+                       }
                        else
+                       {
                                pParamBindInfo[i].ulParamSize =
                                        
(DBLENGTH)param->asString().GetBinaryLength();
-                       pParamBindInfo[i].pwszDataSourceType = L"DBTYPE_BYTES";
+                               pParamBindInfo[i].pwszDataSourceType = 
L"DBTYPE_VARBINARY";
+                       }
                        break;
                default:
                        assert(false);

Other related posts:

  • » [sqlapi-announce] SQLAPI++ 3.7.22 SQLServer (OLEDB) bug fixed at IssOleDbCursor::SetParameterInfo