数据绑定问题 怎样把存储过程绑定到DataGrid中 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string str; SqlCommand com=new SqlCommand(); Open(); com.Connection=base.SConn; com.CommandText="CheckPassword"; com.CommandType=CommandType.StoredProcedure; com.Parameters.Add( new SqlParameter( "@username",username ) ); com.Parameters.Add( new SqlParameter( "@password",password ) ); com.Parameters.Add(new SqlParameter("@tag",SqlDbType.Int,4,ParameterDirection.ReturnValue,false,0,0,string.Empty,DataRowVersion.Default,null)); com.ExecuteNonQuery(); str=com.Parameters["@tag"].Value.ToString(); Close(); return str; 给你参考一下,实际情况在修改,这个是执行带返回直的函数,CheckPassword是存储过程名,password username 是传入参数 ...conndim cmd as new sqlcommand("spName",conn)cmd.CommandType=CommandType.StoredProcedurecmd.para....dim da as new sqldataadapter(cmd)dim ds as new dataset()da.fill(ds) 一个链接超时的问题,求助下。 新手问一个.net 的简单问题, 根据已知的DataRow 的id,如何取得该行在DataTable中的索引,也就是它在第几行 IE实现远程监控 “Web 安装”项目部署问题 身份验证 session 与cookie 孰优孰劣 请问.net怎么连接MySQL 谢谢 如何在sql中打开db数据库文件 在vs2005中如何制作多表头? 为什么我的dataGrid控件翻页没有反应? 我无法弄明白。。。。。。。。。。。。。。。。。 关于asp.net问题
SqlCommand com=new SqlCommand();
Open();
com.Connection=base.SConn;
com.CommandText="CheckPassword";
com.CommandType=CommandType.StoredProcedure;
com.Parameters.Add( new SqlParameter( "@username",username ) );
com.Parameters.Add( new SqlParameter( "@password",password ) );
com.Parameters.Add(new SqlParameter("@tag",SqlDbType.Int,4,ParameterDirection.ReturnValue,false,0,0,string.Empty,DataRowVersion.Default,null));
com.ExecuteNonQuery();
str=com.Parameters["@tag"].Value.ToString();
Close();
return str;
CheckPassword是存储过程名,password username 是传入参数
dim cmd as new sqlcommand("spName",conn)
cmd.CommandType=CommandType.StoredProcedure
cmd.para....dim da as new sqldataadapter(cmd)
dim ds as new dataset()
da.fill(ds)