Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - rs.moveprevious error?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

rs.moveprevious error?

 Post Reply Post Reply
Author
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Topic: rs.moveprevious error?
    Posted: 18 June 2003 at 11:50am

I have the following code snippet. It gets the id number for the next and last records. It generates the error...

Microsoft JET Database Engine error '80040e24'

Rowset does not support fetching backward.

/_stuff/_comics/view_comic.asp, line 24

I opened it dynamically but it doesn't work. Any ideas?

   'Open the database connection
   Dim conn
   Set conn = Server.CreateObject("ADODB.Connection")
   conn.provider = "Microsoft.Jet.OLEDB.4.0"
   conn.mode = AdOpenReadOnly
   conn.open ("DATA SOURCE=c:\myfolder\myfolder2\mydatabase.mdb")
  
   'Open a recordset for the comics database
   Dim rs
   Set rs = Server.CreateObject("ADODB.Recordset")
   rs.Open "SELECT * FROM COMIC", conn, AdOpenDynamic
  
   If request.querystring("id") = "" then
      rs.movefirst
   else
      rs.move request.querystring("id")
   end if 
  
   'Get the id number for the next record and the previous
   Dim nextrecord
   Dim lastrecord
   If rs.fields("cid") = 1 then
      rs.movelast
   lastrecord = rs.fields("cid")
   rs.movefirst
   rs.movenext
   nextrecord = rs.fields("cid")
   rs.moveprevious
   Else
      rs.movenext
   nextrecord = rs.fields("cid")
   rs.moveprevious
   rs.moveprevious
   lastrecord = rs.fields("cid")
   rs.movenext
   End If

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2003 at 2:56pm

  

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2003 at 3:17pm
never mind, it used adOpenKeyset and it worked
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.