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