%
dim conn,rs,str,mul,mulend,str1,n,cnt,cnt1,phypath
phypath=server.mappath("/emrc/prod.mdb")
set conn=Server.CreateObject("ADODB.Connection")
conn.connectionstring="Provider=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&phypath
conn.open
set rs=server.createobject("ADODB.Recordset")
rs.CursorLocation=3
rs.open "select * from production",conn
cnt=rs.recordcount
mul=CInt(request.querystring("name"))
n=CInt(request.querystring("count"))
cnt1=cnt
cnt=CInt(cnt/n)
if ((cnt1-(cnt*n)) mod n) > 0 then
cnt=cnt+1
end if
str="select * from PRODUCTION where CASSETTE_NO between " & ((mul-1)*n)+1 & " and " & ((mul-1)*n)+n
mulend=rs.recordcount
rs.close
rs.open str,conn
%>
 
| Cassette No. |
Title |
Duration |
Month of Production |
Year of Production |
<% i=0
while not rs.eof%>
| <%=rs("CASSETTE_NO")%> |
<%=rs("TITLE")%> |
<%=rs("DURATION")%> |
<%=rs("MONTH_OF_PROD")%> |
<%=rs("year_of_prod")%> |
<%rs.movenext%>
<%wend %>
|
Page:
<%
i=1
while i <= cnt
if i=mul then
response.write(i)
response.write(" | ")
else%>
<%response.write(i)%> |
<%end if
i=i+1
wend%>
<%rs.close%>
|