请问如何获取SqlDataReader得RecordCount值?

marty2000 2004-12-08 10:48:40
请问如何获取SqlDataReader得RecordCount值?
...全文
318 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
生活真美好 2004-12-08
  • 打赏
  • 举报
回复
datatable
cpio 2004-12-08
  • 打赏
  • 举报
回复
select count

李天天~ 2004-12-08
  • 打赏
  • 举报
回复
up
xia0cai 2004-12-08
  • 打赏
  • 举报
回复
select count(*) as count,* from...
在sql语句中处理好出来
marty2000 2004-12-08
  • 打赏
  • 举报
回复
up
marty2000 2004-12-08
  • 打赏
  • 举报
回复
up
marty2000 2004-12-08
  • 打赏
  • 举报
回复
有什么可以代替DataReader?
thinkingforever 2004-12-08
  • 打赏
  • 举报
回复
只有循环完SqlDataReade中的数据
brightheroes 2004-12-08
  • 打赏
  • 举报
回复
读到不能读为止

所以不喜欢DataReader,哇哈哈
marty2000 2004-12-08
  • 打赏
  • 举报
回复
那用什么方法可以很容易地获取RecordCount值?
thinkingforever 2004-12-08
  • 打赏
  • 举报
回复
没有办法取的
cuike519 2004-12-08
  • 打赏
  • 举报
回复
SqlDataReader provides a means of reading a forward-only stream of rows from a SQL Server database.
So you must read and read and calculate count.For example :while() or for().
yoncen 2004-12-08
  • 打赏
  • 举报
回复
@@ROWCOUNT
rachy 2004-12-08
  • 打赏
  • 举报
回复
不要用SqlReader,用SqlDataAdapter就好了

110,552

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧