写sql语句
select count(*) from tablename where your condition
下面一例,
dim conn as new oledb.oledbconnection(connectionstring)
dim com as new oledb.oledbcommmand("select select count(*) from tablename where your condition",conn)
dim dr as new oledb.oledbdatareader
dr=com.excutereader
dr.read()
dim count as integer
count=dr.getvalue(0)
dr.close()count的值即为所选记录数
select count(*) from tablename where your condition
下面一例,
dim conn as new oledb.oledbconnection(connectionstring)
dim com as new oledb.oledbcommmand("select select count(*) from tablename where your condition",conn)
dim dr as new oledb.oledbdatareader
dr=com.excutereader
dr.read()
dim count as integer
count=dr.getvalue(0)
dr.close()count的值即为所选记录数
解决方案 »
- 大家来帮帮忙,ISAPI_Rewrite 虚拟机 实现asp伪静态
- aspx页面传递参数的问题
- 一个多态相关
- 下载一个C#网站,布置到IIS上,访问出现问题:对路径“d:\windows\system32\inetsrv\RuntimeError.log”的访问被拒绝。
- 有个疑问,做自定义控件时候,如何讲属性Description()中的内容,根据浏览器的情况,支持不同语言呢?
- 在网页上获取IE客户端的MAC地址??有几种方案??
- ext.net v1.0 如何同时保存2个GridPanel中的数据
- 怎么安装了adsl后我的.net 工程就打不开了呢
- 急啊!!可以将二维数组绑定到DataGrid吗?
- 怎么引用组件呢?
- !!!打开工程时,总是提示...繁繁繁!!!
- 我刚学.net 有问题请教!
在while reader.read中加上a=a+1就可以了,呵呵。