Guest_imported
New member
- Jan 1, 1970
- 0
- 0
- 0
Please help me resolve this, gurus.
I have a page called view_recs.asp.
It pulls records from the database and displays the records to the screen.
Then I have this code called moveNext.asp.
When records are pulled from the database, view_recs.asp calls moveNext to pull next row of data from the database.
It it will keep calling moveNext until all records are pulled from the database or until it decides to call movePrev to go back.
my code moveNext is not working, neither is movePrev.
Here is the syntax for moveNext and please tell me what is wrong.
thx
<%@ Language=VBScript%>
<%Option Explicit%>
<%Response.buffer=true%>
<%
dim connectionToDatabase,rs
Set connectionToDatabase=Server.CreateObject("ADODB.Connection"
Set rs=Server.CreateObject("ADODB.Recordset"
connectionToDatabase.Open "DSN=aTrac;
rs.Open "SELECT * FROM tblcar",connectionToDatabase,3,3
if rs.EOF Then
rs.moveFirst
end if
if rs.BOF then
rs.MoveLast
End If
rs.MoveNext
Response.Redirect "view_records.asp"
connectionToDatabase.Close
' Set connectionToDatabase=Nothing
%>
I have a page called view_recs.asp.
It pulls records from the database and displays the records to the screen.
Then I have this code called moveNext.asp.
When records are pulled from the database, view_recs.asp calls moveNext to pull next row of data from the database.
It it will keep calling moveNext until all records are pulled from the database or until it decides to call movePrev to go back.
my code moveNext is not working, neither is movePrev.
Here is the syntax for moveNext and please tell me what is wrong.
thx
<%@ Language=VBScript%>
<%Option Explicit%>
<%Response.buffer=true%>
<%
dim connectionToDatabase,rs
Set connectionToDatabase=Server.CreateObject("ADODB.Connection"
Set rs=Server.CreateObject("ADODB.Recordset"
connectionToDatabase.Open "DSN=aTrac;
rs.Open "SELECT * FROM tblcar",connectionToDatabase,3,3
if rs.EOF Then
rs.moveFirst
end if
if rs.BOF then
rs.MoveLast
End If
rs.MoveNext
Response.Redirect "view_records.asp"
connectionToDatabase.Close
' Set connectionToDatabase=Nothing
%>