从数据表复制到DataReader [英] copy from datatable to DataReader
本文介绍了从数据表复制到DataReader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在数据表中从第1行复制到第6行
到DataReader
thnx寻求任何帮助
解决方案
使用SQLCommand.ExecuteReader
就像:
Dim reader as DataReader = command.ExecuteReader
先生,除了实现IDataReader
接口(因为DataReader
是一个连续类并且无法从断开连接的类中读取)之外,我找不到适合您情况的解决方案. /blockquote>
一些研究,您可以使用以下示例进行操作
从数据表读取内容到数据读取器 [ ^ ]
how i can copy from row number 1 to row number 6 in datatable
to DataReader
thnx for any help解决方案useSQLCommand.ExecuteReader
just like:
Dim reader as DataReader = command.ExecuteReader
sir, i can find no solution for your case other than implementingIDataReader
interface (sinceDataReader
is a connented Class and can not read from disconnected classes).
A Little research and you can do it by using the following example
reading contents from a datatable to datareader[^]
这篇关于从数据表复制到DataReader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文