答案:现有10W条数据,Access数据库保存
通过正常提取:
<% Set conn= Server.CreateObject("ADODB.Connection") connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("db2.mdb") conn.Open connstr Set rs = Server.CreateObject ("ADODB.Recordset") sql = "Select * from people order by id desc" rs.Open sql,conn,1,1 Do While Not rs.EOF Response.write rs("id")&" | " rs.MoveNext Loop %> |
<% Set conn = Server.CreateObject("ADODB.Connection") Set cmd = Server.CreateObject("ADODB.Command") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db2.mdb") cmd.ActiveConnection = conn cmd.CommandText = "Select * from people order by id desc" Set rs = cmd.Execute Do While Not rs.EOF Response.write rs("id")&" | " rs.MoveNext Loop %> |
<% Set conn = Server.CreateObject("ADODB.Connection") Set cmd = Server.CreateObject("ADODB.Command") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db2.mdb") cmd.ActiveConnection = conn cmd.CommandText = "Select * from people order by id desc" Set rs = cmd.Execute rsArray = rs.GetRows() For i = 0 To UBound(rsArray, 2) Response.Write rsArray(0, i)&" | " Next %> |
上一个:[整理版]ASP常用内置函数
下一个:DBTree 1.3.2