English 中文(简体)
旧式储存程序导致“当前指挥发生严重错误”。
原标题:PRINT from nested stored procedure causes "A severe error occurred on the current command."

从儿童储存的程序中引出PRINT:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

How to make it not give an error?

> 2005年


i) 有存储程序

ALTER PROCEDURE [dbo].[Archive_SessionDeleteOnly] AS

  SET XACT_ABORT ON

  BEGIN DISTRIBUTED TRANSACTION
  EXECUTE ASILIVE.ContosoLive.dbo.Archive_Delete 
  ROLLBACK TRANSACTION
  PRINT  Fargodeep Mine 

储存儿童的程序是:

ALTER PROCEDURE [dbo].[Archive_Delete] AS

  PRINT  You no take candle 

一、导 言 页: 1 向我的孩子发出的呼吁

You no take candle
Fargodeep Mine
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

整个行动都已完成,但一有错误:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

如果在“儿童”储存程序中删除<条码>:

ALTER PROCEDURE [dbo].[Archive_Delete] AS
  --PRINT  You no take candle 

它没有错误。

i 还可随机添加<代码>NOCOUNT。 (因为没有人知道如何解决这一问题):

ALTER PROCEDURE [dbo].[Archive_Delete] AS

  SET NOCOUNT ON
  PRINT  You no take candle 

它仍然造成:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

服务器A:服务器2000

SELECT @@version
Microsoft SQL Server  2000 - 8.00.818 (Intel X86)   May 31 2003 16:08:15   Copyright (c) 1988-2003 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2) 

服务器B:服务器2000

SELECT @@version
Microsoft SQL Server  2000 - 8.00.2055 (Intel X86)   Dec 16 2008 19:46:53   Copyright (c) 1988-2003 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2) 

无论在Kall服务器中,都没有错误。

• 如何做 服务器在儿童储存程序中使用<代码>PRINT时不使用。 i) 有其他情况,即从儿童程序中订购的印刷材料,没有错误。

<>Update> Trimmed at minimum reproducible case. 事实q

最佳回答

种子是2000年的一个问题,当时由管理室管理室管理查询。

你们是否试图在Query Analyzer开车?

问题回答

暂无回答




相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签