<%@language = "vbscript" codePage = "65001"%>
<!-#includefile = "การเชื่อมต่อ/conn.asp"->
-
dimrecordset1
DimRecordSet1_CMD
DimRecordSet1_Numrows
setRecordSet1_cmd = server.createObject ("adoDB.Command"))
recordSet1_cmd.activeConnection = mm_conn_string
RecordSet1_cmd.CommandText = "SELECT*FRONLIST"
recordSet1_cmd.prepared = true
setRecordSet1 = recordSet1_cmd.execute
RecordSet1_Numrows = 0
-
-
dimrepeat1__numrows
dimrepeat1__index
repeet1__numrows = 2
repeet1__index = 0
RecordSet1_Numrows = recordSet1_Numrows+repeet1__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
'ifwehavethecorretrecordcount, ตรวจสอบธรณีท.
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'tknowtherecordcount ด้วยตนเอง
if (recordset1_total = -1) แล้ว
'CountTheToTalRecordsByiteratingthroughTherecordset
RecordSet1_Total = 0
ในขณะที่ (notrecordset1.eof)
RecordSet1_Total = RecordSet1_Total+1