BUG: Error 15211 from sp_password if SET ANSI_NULLS Is On

Last reviewed: April 8, 1997
Article ID: Q153301
The information in this article applies to:
  • Microsoft SQL Server version 6.5

SYMPTOMS

If a client computer has SET ANSI_NULLS ON and attempts to issue the procedure sp_password to change a password which is currently NULL, the attempt will fail with a 15211 error. Any attempt to change a null password using sp_password through the Microsoft SQL Server ODBC version 2.65.0201 driver results in the error:

   SQLState = 37000, pfNative =  15211
   szErrorMsg = '[Microsoft][ODBC SQL Server Driver][SQL Server]
     Old (current) password incorrect for user -
     password not changed.'

CAUSE

When running against SQL Server 6.5, the Microsoft SQL Server ODBC version 2.65.0201 driver always issues the command SET ANSI_DEFAULTS ON in order to support the ODBC SQL standard, which is based on ANSI SQL. Setting ANSI_DEFAULTS on actually sets a number of ANSI options, including ANSI_NULLS, so users attempting to change a NULL password with sp_password through the ODBC driver will always encounter this error.

WORKAROUND

DB-Library clients such as ISQL/w or Enterprise Manager can do the following:

   SET ANSI_NULLS OFF
   EXEC sp_password NULL,...
   SET ANSI_NULLS ON

Sites should not use ODBC to issue sp_password against SQL Server 6.0.

STATUS

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


Additional query words: SQLExecute
Keywords : kbbug6.50
Version : 6.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: April 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.