untuk asp malah lebih mudah, karena hanya menggunakan 1 query saja.
codingnya kira2 seperti dibawah (maaf kalau ada error, codingnya
belum di debug :))
<%
const_rec_per_page = 20
page = trim(request.querystring("page"))
set conn = Server.CreateObject("ADODB.Connection")
conn.open "PROVIDER=SQLOLEDB;DATA
SOURCE=sqlservername;UID=username;PWD=password;DATABASE=mydatabasename
set rs = server.createobject("ADODB.Recordset")
sql = "SELECT * FROM nama_table"
rs.open sql, conn, 1, 3
const_total_rec = rs.recordcount
if (const_total_rec mod const_rec_per_page = 0) then
const_total_page = cint(const_total_rec / const_total_page)
else
const_total_page = cint((const_total_rec / const_total_page)
+ 1)
end if
if (isnumeric(page)) then
const_start_rec = cint((page - 1) * const_rec_per_page)
else
const_total_rec = 0
end if
rs.move const_total_rec
do while(not rs.eof)
const_total_rec = const_total_rec + 1
response.write(rs("nama_field"))
if (const_total_rec mod const_rec_per_page = 0) then
exit do
end if
rs.movenext
loop
if (const_total_page > 0) then
for i = 1 to const_total_page
if (cint(i) = cint(page)) then
response.write("<b>" & i & "</b> ")
else
response.write("<a href=""nama_page.asp?
page=" & i & """>" & i & "</a> ")
end if
next
end if
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
--- In [email protected], "*** stern ***"
<[EMAIL PROTECTED]> wrote:
>
> Kalo untuk asp, gimana?
> Thx.
>
> Dyah
> ABGers 4 ever
>
> Y!M : canopus_sirius
------------------------ Yahoo! Groups Sponsor --------------------~-->
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/VpTY2A/lzNLAA/yQLSAA/IHFolB/TM
--------------------------------------------------------------------~->
----------------------------------------------------------
Komunitas MasterWeb Indonesia http://www.master.web.id
----------------------------------------------------------
MWN, Masternya WEBHOSTING di Indonesia, Indo/USA Servers,
Customer Support 24 jam http://www.masterwebnet.com
----------------------------------------------------------
WebDevelopment,Designing/Programming http://www.dlanet.com
----------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/milis-masterweb/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/