sumit2nice
10-07-2004, 04:16 AM
Hello Friends,
I am Sumit Sharma from India.
I have made a page which is showing the data from MS-access database,
I am showing only one record.
My Query:
I want to add the Next and previous buttons on the page, when anybody click on
next button then its shows the next record on the page, and old record disappear
from the page, Can anybody help me to make it possible?
My Code:-
<%@ Language= VBScript %>
<% option explicit %>
<!-- #include virtual = "/adovbs.inc" -->
<html>
<body>
<%
dim objconn
Set objconn = Server.CreateObject ("ADODB.Connection")
objconn.connectionstring= "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=C:\Inetpub\wwwroot\ss.mdb"
objconn.Open
dim objrs
Set objrs = Server.CreateObject ("ADODB.recordset")
objrs.open "database1", objconn, adopenkeyset, , adcmdtable
response.write "Identification Number : " & objrs("id")&"<br>"
response.write objrs("site") &"<br>"&"<HR>"
objrs.movenext
objrs.close
set objrs = nothing
objconn.close
set objconn = nothing
%>
</body>
</html>
*****************************************************
Please edit the script.
I am waiting for your Reply.
Thanking you, Sir
Sumit Sharma
I am Sumit Sharma from India.
I have made a page which is showing the data from MS-access database,
I am showing only one record.
My Query:
I want to add the Next and previous buttons on the page, when anybody click on
next button then its shows the next record on the page, and old record disappear
from the page, Can anybody help me to make it possible?
My Code:-
<%@ Language= VBScript %>
<% option explicit %>
<!-- #include virtual = "/adovbs.inc" -->
<html>
<body>
<%
dim objconn
Set objconn = Server.CreateObject ("ADODB.Connection")
objconn.connectionstring= "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=C:\Inetpub\wwwroot\ss.mdb"
objconn.Open
dim objrs
Set objrs = Server.CreateObject ("ADODB.recordset")
objrs.open "database1", objconn, adopenkeyset, , adcmdtable
response.write "Identification Number : " & objrs("id")&"<br>"
response.write objrs("site") &"<br>"&"<HR>"
objrs.movenext
objrs.close
set objrs = nothing
objconn.close
set objconn = nothing
%>
</body>
</html>
*****************************************************
Please edit the script.
I am waiting for your Reply.
Thanking you, Sir
Sumit Sharma