使用下面的代码 执行存储过程
Dim cmd As new SQLCommand
cmd.C
cmd.CommandText = "EXEC [dbo].[sysid_add] ?"
cmd.Parameters.Add("@sysidname","sanoid")
Dim dt As DataTable = cmd.ExecuteReader
显示 dt.datarows.count
Output.Show(dt.datarows.count)
结果为 0
数据库显示执行成功
ALTER PROCEDURE [dbo].[sysid_add]
@sysidname nchar(20) = 'sanoid'
as
BEGIN
u.pdate sysid
set sysidnum=sysidnum+1
WHERE sysidname = @sysidname
SET NOCOUNT ON;
S.ELECT * FROM sysid
WHERE sysidname = @sysidname
end
[此贴子已经被作者于2019/10/25 14:28:29编辑过]