BUG: INSERT INTO EXECUTE and Xp_cmdshell May Cause Error 3601

Last reviewed: April 9, 1997
Article ID: Q157519
The information in this article applies to:
  • Microsoft SQL Server, version 6.5
BUG #: 15638 (WINDOWS 6.50)

SYMPTOMS

When you use xp_cmdshell to return results through the INSERT INTO EXECUTE Transact-SQL statement, and the results that are returned contain NULL values, and the table definition specifies a NOT NULL constraint, you may receive the following errors:

   Msg 515, Level 16, State 3
   Attempt to insert the value NULL into column 'strInfo', table
   'tempdb.dbo.#tblBugs2___________0000000040';
   column does not allow nulls.  INSERT fails.

   Msg 3601, Level 25, State 1
   Stored function 'xp_cmdshell' in the library 'xpsql60.dll' generated
   access violation; SQL Server is terminating process 10

These errors occur only if all of the following conditions are true:
  • You have more than one NULL value in a row being returned.
  • The table does not allow NULL values.
  • Xp_cmdshell returns the values to an INSERT INTO EXECUTE statement.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.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 kbusage SSrvTran_SQL
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 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.