如何在asp.net中返回DataReader

编程入门 行业动态 更新时间:2024-10-26 15:12:49
本文介绍了如何在asp中返回DataReader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

亲爱的所有人 我正在尝试使用方法返回数据读取器,但是当我在代码中调用此方法时,它已关闭,因此我无法读取它. 有什么解决办法吗? 请还原... 谢谢

Dear All I am trying to return datareader using method .but its getting closed when i am calling this method in my code and because of this I cant read it. Is there any solution for the same? please revert... Thanks

推荐答案

看这里: 使用DataReader(ADO.NET)检索数据 [ ^ ] 在此处阅读有关ADO.NET的全部信息: MSDN:ADO.NET [ ^ ] MSDN:使用ADO.NET访问数据 [ ^ ] C#Station ADO.NET教程 [ ^ ] 为初学者使用ADO.NET [ ^ ] Look here: Retrieving Data Using a DataReader (ADO.NET)[^] Read all about ADO.NET here: MSDN: ADO.NET[^] MSDN: Accessing Data with ADO.NET[^] The C# Station ADO.NET Tutorial[^] Using ADO.NET for beginners[^]

DataReader 不支持断开连接模式.一旦连接对象被关闭,DataReader 将被关闭.您可以使用DataTable 而不是DataReader 来支持断开连接模式. DataReader does not support disconnected mode. Once the connection object is closed, DataReader will be closed. You can use DataTable instead of DataReader to support disconnected mode.

但是请将代码发送给我们,以便我们为您提供帮助 But send us the code,so that we can help you

更多推荐

如何在asp.net中返回DataReader

本文发布于:2023-05-31 10:08:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/389594.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   asp   DataReader   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!