0
我寫了一個商店程序。我不知道如何從商店程序獲得打印信息
CREATE PROCEDURE [dbo].[Test]
(@Num int)
AS
BEGIN
IF @Num = 1
PRINT 'This is One';
ELSE
PRINT 'This is Another';
END
我在.NET
Dim SqlCmd as new sqlcommand
DIm SqlCon as new sqlconnection
sqlcon.connectionstring =""
sqlCmd.connection =con
sqlcon.open()
sqlcmd.commandtext ="Test"
Sqlcmd.commandtype = commandtype.storeprocedure
實現我不知道如何從存儲過程打印消息 請幫助我。
可能的重複。 http://stackoverflow.com/questions/299797/retrieving-output-messages-from-batch-sql-command-sql-server – 2011-03-07 07:57:42