Web Development
--
Questions
--
Followers
Top Experts
**************************
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
/spick/pages.asp, line 48
**************************
line 48:
rs.AbsolutePage = PageIndex 'Define what page number on which the current record resides.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
******************
file:pages.asp
*******************
<%option explicit%>
<!-- #include file="pages_support.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><style type="text/css">
td{
font-family: verdana;
font-style: normal;
font-weight: bold;
font-size: .6em;
}
</style></head><body>
<%
'########## DSN-less connections ##########################
Dim DBName, objConn, rs, strSQL '//Variables we need
DBName = server.mappath("spick98.md
'//Create ADO connection
Set objConn = Server.CreateObject("ADODB
'//Open our student database with this string
objConn.ConnectionString = "DBQ=" & DBName & ";Driver={Microsoft Access Driver (*.mdb)};"
'//Access our database
objConn.Open
'//Create a recordset
Set rs = Server.CreateObject("ADODB
'#########################
strSQL = "SELECT * FROM DAFTARHARTASH01 ORDER BY id_no"
set rs = objConn.Execute(strSQL)
Dim IntPageSize, PageIndex, TotalPages, TotalRecords
Dim RecordCount, RecordNumber
IntPageSize = 5
PageIndex = Request("PageIndex")
'If pageIndex is empty, set it to one.
if PageIndex = "" then PageIndex = 1
RecordCount = rs.RecordCount
RecordNumber = (PageIndex * IntPageSize) - (IntPageSize)
rs.PageSize = intPageSize ' Set the number of records per page
rs.AbsolutePage = PageIndex 'Define what page number on which the current record resides.
TotalPages = rs.PageCount
dim intPrev, intNext
intPrev = PageIndex - 1
intNext = PageIndex + 1 'same as rs.AbsolutePage
'Build table header
With Response
.write "<table border=1 cellpadding=5 cellspacing=0>"
.write "<tr bgcolor=goldenrod>"
.write "<td>###</td>"
.write "<td>ID</td>"
.write "<td>Jenama</td>"
.write "<td>No Harta</td>"
.write "<td>KOd Kumpulan</td>"
.write "<td>No Siri</td>"
.write "<td>Lokasi</td>"
.write "</tr>"
end with
Dim Count 'We'll use this to limit the number of records displayed on a page
Count = 1
do while NOT rs.EOF AND Count <= IntPageSize
With Response
.Write"<tr>"
.Write "<td>" & RecordNumber + Count & "</td>"
.Write "<td>" & rs("id_no") & "</td>"
.Write "<td>" & rs("jenama") & "</td>"
.Write "<td>" & rs("no_harta1") & "</td>"
.Write "<td>" & rs("kod_kumpulan") & "</td>"
.Write "<td>" & rs("no_siri") & "</td>"
.Write "<td>" & rs("lokasi") & "</td>"
.write "</tr>"
End with
count = count + 1
rs.MoveNext
loop
Response.Write "<tr><td align=center colspan=9 bgcolor=gainsboro>"
call BuildNav2 (intPrev,IntNext,TotalPage
response.write "</td></tr></table>"
rs.close
%>
</body></html>
**************************
file:pages_support.asp
**************************
<%
Sub BuildNav2 (intPrev,IntNext,TotalPage
Dim counter
Response.Write "<font face=verdana size=1><b>"
' If the previous page id is not 0, then let's add the 'prev' link.
if intPrev <> 0 then
With Response
.Write "<a href=pages.asp?PageIndex="
.Write intPrev & "><< previous</a>"
.Write NBSP(5)
End With
end if
'This section displays the list of page numbers as links, separated with the pipe ( | )
counter = 1
Response.Write "jump to page: "
do while counter <= TotalPages
' If the current page is the same as the counter, then write the page number with no hyperlink
if cint(counter) = cint(PageIndex) then
Response.Write counter
Else
' Else, let's write the page number as a hyperlink to that page
Response.Write "<a href=pages.asp?PageIndex="
Response.Write counter & ">" & Counter & "</a>"
End if
' As long as we're not at the last page number in this loop, let's add a pipe to the string.
if cInt(counter) <> TotalPages then
Response.Write " | "
end if
counter = counter + 1
Loop
if (rs.AbsolutePage <> -3) then
With Response
.Write NBSP(5)
.Write "<a href=pages.asp?PageIndex="
.Write intNext & ">next >></a>"
End With
end if
Response.Write "<br />" & rs.recordcount & " records found"
Response.Write "</b></font>"
end Sub
%>
<%
function Connect()
'########## DSN-less connections ##########################
Dim DBName, objConn, rs, strSQL '//Variables we need
DBName = server.mappath("spick98.md
'//Create ADO connection
Set objConn = Server.CreateObject("ADODB
'//Open our student database with this string
objConn.ConnectionString = "DBQ=" & DBName & ";Driver={Microsoft Access Driver (*.mdb)};"
'//Access our database
objConn.Open
'//Create a recordset
Set rs = Server.CreateObject("ADODB
'#########################
end function
%>
<%
function NBSP(count)
dim i
for i = 1 to count
NBSP = NBSP + " "
next
end function
%>
ie
objConn.CursorType = adOpenDynamic (you might have to use the number value if you are using asp rather than .net).






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
'//Open our student database with this string
objConn.ConnectionString = "DBQ=" & DBName & ";Driver={Microsoft Access Driver (*.mdb)};"
'//Access our database
objConn.Open
To this;
'//Open our student database with this string & CursorType = adOpenDynamic (2)
objConn.ConnectionString = "DBQ=" & DBName & ";Driver={Microsoft Access Driver (*.mdb)};"
objConn.CursorType = 2
'//Access our database
objConn.Open

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
'//Create ADO connection
Set objConn = Server.CreateObject("ADODB
'//Open our student database with this string
objConn.ConnectionString = "DBQ=" & DBName & ";Driver={Microsoft Access Driver (*.mdb)};"
'//Access our database
objConn.Open
'//Create a recordset
Set rs = Server.CreateObject("ADODB
'#########################
strSQL = "SELECT * FROM DAFTARHARTASH01 ORDER BY id_no"
set rs = objConn.Execute(strSQL)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdaobj01.asp






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
peace...
may God bless u....

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Web Development
--
Questions
--
Followers
Top Experts
Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.