<%@言語= "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
Repeat1__numrows = 2
Repeat1__index = 0
RecordSet1_Numrows = RecordSet1_Numrows+Repeat1__Numrows
%>
<%
'*** RecordSetStats、MovetOreCord、AndGotoreCord:decrarestatsvariables
dimrecordset1_total
dimrecordset1_first
dimrecordset1_last
'SetthereCordCount
RecordSet1_Total = RecordSet1.RecordCount
'setthenumberofrowsdisplayedonspage
if(recordset1_numrows <0)then
RecordSet1_Numrows = RecordSet1_Total
elseif(recordset1_numrows = 0)then
RecordSet1_Numrows = 1
endif
'setthefirstandlastdisplayedRecord
RecordSet1_First = 1
RecordSet1_Last = RecordSet1_First+RecordSet1_Numrows-1
'ifwehaveTheCorrectRecordCount、CheckTheotherStats
if(recordset1_total <> -1)then
if(recordset1_first> recordset1_total)then
RecordSet1_First = RecordSet1_Total
endif
if(recordset1_last> recordset1_total)then
recordset1_last = recordset1_total
endif
if(recordset1_numrows> recordset1_total)then
RecordSet1_Numrows = RecordSet1_Total
endif
endif
%>
<%
'*** RecordSetStats:IfWedon'tKnowthereCordCount、手動でカウントされます
if(recordset1_total = -1)then
'CountTheTotalRecordsbyiteratingThreaCordset
RecordSet1_Total = 0
while(notrecordset1.eof)
RecordSet1_Total = RecordSet1_Total+1