更新时间:2022-11-24 21:41:19
//编写存储过程以获取数据
如果您需要从多个表中获取数据,请使用连接
//填充数据集
//write a store procedure to fetch data
if you need to fetch the data''s from more than one table use joins
//To fill a dataset
SqlConnection con =new SqlConnection("");
SqlCommand cmd =new SqlCommand("sp name",con);
cmd.CommandTye=commandType.StoredProcedure;
SqlDataAdapter da=new SqlDataAdapter(cmd);
Dataset ds=new Dataset();
da.Fill(ds);
浏览以下链接,并练习示例
http://www.java2s.com/Code/CSharp/Database- ADO.net/CatalogDatabase-ADO.net.htm [ ^ ]
谢谢
--RA
Go through the below link, and practice the examples
http://www.java2s.com/Code/CSharp/Database-ADO.net/CatalogDatabase-ADO.net.htm[^]
Thanks
--RA
假设您要对数据集执行操作,我提供了以下链接,这些链接将帮助您入门.
http://msdn.microsoft.com/zh-CN /library/system.data.dataset(v=vs.71).aspx [ http://www.csharp-station.com/Tutorial/AdoDotNet/lesson05 [ ^ ]
为初学者使用ADO.NET [ http://www.dotnetperls.com/dataset [
Assuming you want to perform operations on dataset, I am providing following links which will help you in getting started.
http://msdn.microsoft.com/en-us/library/system.data.dataset(v=vs.71).aspx[^]
http://www.csharp-station.com/Tutorial/AdoDotNet/lesson05[^]
Using ADO.NET for beginners[^]
http://www.dotnetperls.com/dataset[^]