<%
Const NumPerPage = 30
Dim CurPage
If Request.QueryString("CurPage") = "" then
CurPage = 1 'We're on the first page
Else
CurPage = Request.QueryString("CurPage")
End If
Set DataConn = Server.CreateObject("ADODB.Connection")
dataconn.ConnectionTimeout =30
dataconn.CommandTimeout =30
dim strc
strC="Provider=SQLOLEDB.1;Password=yyl;" + "Persist Security Info=True;User ID=yl;"+ "Initial Catalog=yiliao;" + "Data Source=211.144.22.194;Connect Timeout=30"
dataconn.open strc
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set myrecordset = Server.CreateObject("ADODB.Recordset")
myrecordset.CacheSize = NumPerPage
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = dataConn
cmdTemp.CommandText = "SELECT count(url) FROM medic.jkkd where type='yl'"
myrecordset.Open cmdTemp, , 1, 3
if not myrecordset.EOF then
zong=cstr(myrecordset(0))
else
zong="0"
end if
myrecordset.Close
%>
<%
cmdTemp.CommandText = "SELECT * FROM medic.jkkd where type='yl' order by num desc"
myrecordset.Open cmdTemp, , 1, 3
dim count
count=0
if not myrecordset.eof then
myrecordset.MoveFirst
myrecordset.PageSize = NumPerPage
TotalPages = myrecordset.PageCount
myrecordset.AbsolutePage = CurPage
do while not myrecordset.eof And Count14 then
%>
 |
<%=myrecordset(3)%> |
<%else%>
 |
<%=myrecordset(3)%> |
|
<%
end if
Count = Count + 1
myrecordset.MoveNext
loop
%>
<%
Response.Write(" 页 数:")
for i=1 to TotalPages step 1
if cstr(i)=cstr(curpage) then
Response.Write(""&i&" ")
else
Response.Write(""&i&" ")
end if
next
end if
myrecordset.Close
dataconn.Close
set myrecordset=nothing
set dataconn=nothing
%>
|