<%@语言=“ vbscript” codepage =“ 65001”%>
<! - #includefile =“ connections/conn.asp” - >
<%
dimRecordSet1
DIMRECORDSET1_CMD
dimRecordSet1_numrows
setRecordSet1_cmd = server.createobject(“ adodb.command”)
recordset1_cmd.activeconnection = mm_conn_string
recordset1_cmd.commandText =“ select*fromlist”
recordset1_cmd.prepared = true
setRecordSet1 = recordset1_cmd.execute
RecordSet1_numrows = 0
%>
<%
dimrepeat1__numrows
dimrepeat1__index
重复1__numrows = 2
重复1__Index = 0
RecordSet1_numrows = RecordSet1_numrows+repot1__numrows
%>
<%
'*** RecordSetStats,Movetorecord,andGotorecord:DeclareStatSvariables
dimRecordSet1_total
dimRecordSet1_first
dimRecordSet1_last
'SetThereCordCount
recordset1_total = recordset1.recordCount
'setthenumberofrowsdisplayedonthispage
if(recordset1_numrows <0),然后
recordset1_numrows = recordset1_total
Elseif(recordset1_numrows = 0)
recordset1_numrows = 1
Endif
'setthefirstandlastDisplayedRecord
RecordSet1_first = 1
RecordSet1_last = RecordSet1_first+RecordSet1_numrows-1
``如果wehavethecorrectRecordCount,请检查thetheotherstats
if(recordset1_total <> -1),然后
if(recordset1_first> recordset1_total)
recordset1_first = recordset1_total
Endif
if(recordset1_last> recordset1_total),然后
recordset1_last = recordset1_total
Endif
if(recordset1_numrows> recordset1_total)
recordset1_numrows = recordset1_total
Endif
Endif
%>
<%
'*** RecordSetStats:Ifwedon'tknownknowwhereCordCount,手动判决
if(recordset1_total = -1),然后
'countThetTalRecorDsByiteratingThroughThereCordSet
RecordSet1_Total = 0
while(notrecordset1.eof)
recordset1_total = recordset1_total+1