Access 分页查询
自己做的一个.net错误收集,收集整站的500错误,用的access数据库。数据过20000后,使用传统的SELECT TOP 10 * from TABLE WHERE ID NOT IN(SELECT TOP 10*10 * from TABLE)查询竟然要好几分钟,汗~~~~!
网上查到的一条语句还不错。
SELECT TOP 10 id,Message,CreateTime from errMessage where (id > (SELECT MAX(id) from (SELECT TOP 10 id from errMessage ORDER BY id ) AS T)) ORDER BY ID
根据最大的ID来查,必须要有一个自增长的标识列即可!
相关文档:
public static DataTable GetSchemaTable(string connectionString) //获取Access所有的表名;
{
using (OleDbConnection connection = new
&n ......
在SQL Server中模糊查询通常是这样的Select * from articleTable where authorName like '%jacky%'
但是在Access中用这条语句执行的时候竟然发现查不出结果,怎么可能呢?
后来查了下资料,发现问题如下:
要进行模糊查找,则必须使用通配符,ACCESS库的通配符和SQL SERVER的通配符不一样。
ACCESS库的通配符为:
*& ......
转帖:http://www.stealthcopter.com/blog/2010/01/android-requesting-root-access-in-your-app/
This snippet shows how root access can be requested inside an application in order to write a file into a place we do not have permission to access usually. Requesting root access will only work if your phon ......
<%Dim connstrconnstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Stu.mdb")
Set bb = Server.CreateObject("ADODB.Connection")
bb.Open connstr%>
<html>
<head>
<meta http-equiv="content-Language" content="zh-cn" />
<meta http-equiv="Content-Type ......