asp.net和ado.net问题 [英] asp.net and ado.net questions

查看:104
本文介绍了asp.net和ado.net问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

何时使用数据集以及何时使用数据读取器?为什么?如果我们要编辑数据库中的1000条记录,这是最好的数据集或数据读取器?

when we use dataset and when datareader? why? if we want to edit 1000 records in database which is the best dataset or datareader?

推荐答案

何时何地,这个问题没有一个明确的答案.在太多不同的情况下,这取决于许多因素.您不需要一次观察所有可行的场景,对吗?您引用的1000条记录几乎没有告诉我们.

整个方法是错误的.您应该首先了解事物的工作原理,然后尝试使用逻辑推理将这些知识与您的问题和要求联系起来.

我通常向初学者推荐此CodeProject文章:为初学者使用ADO.NET [ ^ ].

另请参见:
http://en.wikipedia.org/wiki/ADO.NET [ http://msdn.microsoft.com/en-us/library/aa286484.aspx [ ^ ].

—SA
There is no one single unambiguous answers to the question when and why. It depends on many factors in too many different scenarios. You don''t need to observe all thinkable scenarios at once, right? Your reference to 1000 records tells us almost nothing.

The whole approach is wrong. You should first learn how things work and then try to link this knowledge with your problem and requirements trying to use logical reasoning.

I usually recommend this CodeProject article for starters: Using ADO.NET for beginners[^].

See also:
http://en.wikipedia.org/wiki/ADO.NET[^],
a place to start: http://msdn.microsoft.com/en-us/library/aa286484.aspx[^].

—SA


以下是一些可能对您有用的页面:
http://www.4guysfromrolla.com/articles/050405-1.aspx [ ^ ]

http://www.sitepoint.com/dataset-datareader/ [ http://ramanisandeep.net/2009/09/21/datareader-vs-dataset/ [ ^ ]

使用Google搜索DataReader vs DataSet获得更多结果.
Here are some pages which may be useful for you :
http://www.4guysfromrolla.com/articles/050405-1.aspx[^]

http://www.sitepoint.com/dataset-datareader/[^]

http://ramanisandeep.net/2009/09/21/datareader-vs-dataset/[^]

Google for DataReader vs DataSet for more results.


这篇关于asp.net和ado.net问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆