什么是数据读取器和数据适配器及其连接? [英] what is datareader and dataadapter and its connections?with example

查看:69
本文介绍了什么是数据读取器和数据适配器及其连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道吗?

带有示例及其连接体系结构的datareader和datadapter是什么
请举个例子给我解释.

Anyone know this?

what is the datareader and datadapter with example and its connections architecture
Please explain me with example..

thanks in advance.

推荐答案

这些问题看起来脱离了所讨论概念的上下文,因此在没有其他相关概念的情况下给出一些定义"或解释就无法回答帮助任何人.您需要了解整个图片.

例如,请参阅此CodeProject文章,其中包含非常简单的源代码示例:为初学者使用ADO.NET [ ^ ].

详细了解概念,您将需要它.从这里开始:
http://msdn.microsoft.com/en-us/library/h43ks021%28v = VS.100%29.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/e80y5yhx.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/aa302325.aspx [ ^ ].

-SA
These questions look ripped out of the context of the concepts in question, so answering by giving some "definition" or explanation without other related concepts cannot help anyone. You need to get the whole picture.

See, for example, this CodeProject article with really simple source code samples: Using ADO.NET for beginners[^].

Learn the concepts in more detail, you will need it. Start here:
http://msdn.microsoft.com/en-us/library/h43ks021%28v=VS.100%29.aspx[^],
http://msdn.microsoft.com/en-us/library/e80y5yhx.aspx[^],
http://msdn.microsoft.com/en-us/library/aa302325.aspx[^].

—SA


http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson04.aspx [ ^ ]

http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson05 [ ^ ]
http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson04.aspx[^]

http://www.csharp-station.com/Tutorial/AdoDotNet/Lesson05[^]


Datareader和DataAdapter是ADO.NET的对象

数据读取器:
它是连接的体系结构.从数据库中获取记录时,需要保持连接打开.它将一次获取一个记录.它是转发且只读的
此处 [ ^ ]是数据读取器的示例.

数据适配器:
它是断开连接的体系结构.从数据库中获取记录时,无需保持连接打开.
示例 [
Datareader and DataAdapter are the objects of ADO.NET

Datareader:
it is connected architecture. You need to keep connection open while fetching records from database. It will fetch one record at a time. It is forward and readonly
here[^] is example of datareader.

Dataadapter:
it is disconnected architecture. You not need to keep connection open while fetching records from database.
example[^]


这篇关于什么是数据读取器和数据适配器及其连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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