BUG: INSERT INTO EXECUTE and Xp_cmdshell May Cause Error 3601

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.

Keywords : kbusage SSrvTran_SQL kbbug6.50
Version : 6.5
Platform : WINDOWS
Issue type :


Last Reviewed: April 3, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.