分开写看看。SqlParameter c = new SqlParameter("@c",SqlDbType.Int)
c.Direction = ParameterDirection.OutPut
Scomm.Parameter.Add(c)
conn.open();
Scomm.ExecuteNonQuery()
conn.Close();
Label1.Text = c.value.ToString();
c.Direction = ParameterDirection.OutPut
Scomm.Parameter.Add(c)
conn.open();
Scomm.ExecuteNonQuery()
conn.Close();
Label1.Text = c.value.ToString();
解决方案 »
- Asp.net Ajax javascript 子类如何调用父类的变量
- 关于linkbutton的 CommandArgument的问题
- 点击treeview 怎么又生成一个新的treeview控件 数据是从数据库中绑定的
- 【超级难题】给定一个属性名称,如何返回一个对象中的这个属性
- 怎么用JAVASCRIPT验证gridview中选定的哪一行里的TEXTBOX的值是否为空
- 搜索时如何把特殊字付(@,#,$,^,')转成其它字付
- 帮帮忙
- 如何从Pagelet.aspx中获取Pagelet.ascx的控件值???在线等
- EF如何映射数据库外键约束的细节?
- ★★留言板用每个用户发送前后两条留言时间的间隔来限制用户频繁留言的问题★★实在是没分了,给到帮助的我再申个号送分
- iframe和frameset的问题
- 请大家看看网站http://www.yqsoft.com用的什么技术,页面刷新感觉很舒服!
2.读取参数
3.conn.close
Scon.Open()--加此行
dim Scomm as new SQLDataAdapter("count_authors",Scon)
Scomm.selectcommand.commandtype=commandtype.storedprocedure
Scomm.selectcommand.parameters.add(new SQLParameter("@c",SQLDbtype.int))
Scomm.selectcommand.parameters("@c").direction=parameterdirection.output
Scon.Close;--加此行
label1.text=system.math.ceiling(Scomm.selectcommand.parameters("@c").value)
@c int output
AS
select @c=count(*) from authors
GO