<%@ Language="VBScript" %> <% ' ********************************************************************** ' ' * by Nigel Wood * ' ' * Email address: nhsa@yahoo.com * ' ' * Last update: Jan 2000. * ' ' * * ' ' * Break Database Select into Pages example * ' ' ********************************************************************** ' Response.Expires = -1000 ' Request QueryString ' intpagestrt = CInt(Request("pagestrt")) ' First item on this page ' ' Examine the Requests ' If intpagestrt = 0 Then intpagestrt = 1 End If ' Define Value ' intpageskip = 15 ' The number of items per page ' ' CHANGE THIS LINE TO MATCH THE LOCATION OF YOUR DATABASE ' ' ******************************************************* ' 'strdblocation = Server.MapPath("c:\onlinenigeria\db\BrinksterExampleDatabase.mdb") ' ******************************************************* ' %> Nigeria - Guest Book of OnlineNigeria
   
  Guest Book:
  Welcome to our Guest Book. To sign our Guest Book, please click here.

 

Advertise Here:

Free Email

 

In Association with Amazon.com

<% Response.Write ("
" & vbCrLf) Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=E:\HostingSpaces\devace\gbook.onlinenigeria.com\db\articles.mdb") strdbsql = "SELECT * from gbook Order by ItemID DESC" Set oRS = oConn.Execute(strdbsql) Response.Write ("" & vbCrLf) Response.Write ("" & vbCrLf) Response.Write ("" & vbCrLf) If oRS.EOF Then Response.Write ("" & vbCrLf) intlocalcount = 0 Else intlocalcount = 1 Do While Not oRS.EOF If intlocalcount >= intpagestrt and intlocalcount < intpagestrt+intpageskip Then Response.Write ("
" & "
" & vbCrLf) Response.Write ("" & vbCrLf) Response.Write ("" & "" & "" & "" & oRS("Linkname") & "" & "" & "" & vbCrLf) Response.Write ("" & oRS("whenadded") & " " & " " & " " & " " & " " & " " & " " & oRS("sponsors") & " " & " " & " " & " " & " " & " " & " " & oRS("IpAddress") & "" & vbCrLf) Response.Write ("" & "
" & vbCrLf) Response.Write ("Comment") Response.Write ("" & oRS("LinkDescription") & "" ) Response.Write ("") End If oRS.MoveNext intlocalcount = intlocalcount + 1 Loop End If oConn.Close Set oRS = Nothing Set oConn = Nothing Response.Write ("
" & vbCrLf) Response.Write ("



") If intpagestrt > 1 Then Response.Write ("") Else Response.Write ("") End If Response.Write ("    " & vbCrLf) Response.Write("") Response.Write ("    " ) If intpagestrt+intpageskip < intlocalcount Then Response.Write ("") Else Response.Write ("") End If Response.Write ("
" ) Response.Write ("
There are currently no entries
" & vbCrLf) %>