BUG: Error 206 Calling Procedure with SQL_DEFAULT_PARAM

Last reviewed: November 7, 1997
Article ID: Q161591
6.50 2.50 The information in this article applies to:
  • Microsoft SQL Server, version 6.5
  • Microsoft Open Database Connectivity, version 2.5
BUG #: 16386

SYMPTOMS

If an application specifies SQL_DEFAULT_PARAM for pcbValue when doing a SQLBindParameter on a parameter in a SQL Server stored procedure, and the parameter has a default of NULL, the following SQLExecute or SQLExecDirect will fail with SQL_ERROR, and a call to SQLError will return the following error:

   szSqlState = "22005", *pfNativeError = 206,
   szErrorMsg="[Microsoft][ODBC SQL Server Driver][SQL Server]
                    Operand type clash: NNN is incompatible with void type"

where NNN is the datatype of the parameter (for example, int or char).

WORKAROUND

To work around this problem, specify SQL_NULL_DATA instead of SQL_DEFAULT_PARAM for pcbValue.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5 and Open Database Connectivity version 2.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words:
Keywords : kbbug6.50 SSrvProg kbinterop kbusage
Version : 6.5 2.5
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.