在.NET中调用存储过程
来源:互联网 发布:ubuntu 学打字 编辑:程序博客网 时间:2024/05/01 02:29
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
今天试了一下用存储过程取得数据。归纳方法如下:
1.用SqlCommand和DataSet:SqlConnection conn=new SqlConnection("server=(local);uid=;password=;database=");SqlCommand cmd=new SqlCommand("StoreProcedure",connn);cmd.CommandType=CommandType.StoreProcedure;
SqlDataAdapter dsCommand=new SqlDataAdapter(cmd);DataSet ds=new DataSet();dsCommand.Fill(ds);
2.用SqlCommand和SqlDataAdapterSqlconnection conn=new SqlConnection("server=(local);uid=;password=;database=");SqlCommand cmd=new SqlCommand("StoreProcedure",conn);cmd.CommandType=CommandType.StoreProcedure;SqlDataReader dr=cmd.ExecuteReader()while(dr.Read()){ Response.Write(dr.Item["Field"]);}
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 在.NET中调用存储过程
- 在.NET中调用存储过程
- 在.NET中调用存储过程
- 在.NET中调用存储过程
- 在ASP.NET中调用存储过程
- 在.NET中调用存储过程
- 在IBatis.Net中调用存储过程
- 在.NET中调用存储过程
- .net中调用存储过程
- 在.NET中调用Oracle9i存储过程经验总结
- 在.NET中调用Oracle9i存储过程经验总结
- 转载:TonyBaoBao:在.NET中调用Oracle9i存储过程经验总结
- 在.NET中调用Oracle9i存储过程经验总结
- 在.NET中调用Oracle9i存储过程经验总结
- 在.NET中调用Oracle9i存储过程经验总结
- 在ASP.NET中调用存储过程方法新解
- 在ASP.NET中调用存储过程方法新解
- 在ASP.NET中调用存储过程方法新解
- nhibernate数据加载之Criteria加载
- 收集了一些小技巧的连接 (.NET)
- 在图片上写字 (C#)
- C# 把指定控件显示在最上面
- 转贴 打印机自定义纸张
- 在.NET中调用存储过程
- For 和 Foreach 的比较
- 如何得到某集合的所有子集合?
- 非递归解决组合问题
- nhibernate源码分析之开篇: 计划和安排
- 关于常见vb工程中createobject的效率分析
- 成功面试五条法则
- 公农历转换VB类
- 经典常用的VBB代码标签