Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: error '80040e24'


Message #1 by "Eduardo Porcel" <eporcel@l...> on Thu, 12 Dec 2002 21:22:56
Im getting the following error


Microsoft OLE DB Provider for ODBC Drivers error '80040e24' 

Rowset does not support fetching backward. 

/gali/Noticia.asp, line 36 

I´m trying to display records from the last to the first, I have another 
program that works perfect.
My code is as follows:

<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include file="ADOVBS.INC"-->

<%
dim Conn
dim ciclo

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DBQ=D:\FTP\lrsme\Database\cursosbd.mdb;DefaultDir=D:\FTP\lrsme\D
atabase;Driver={Microsoft Access Driver (*.mdb)}"

Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "NOTIC", Conn, , adLockReadOnly, adCmdTable

objRS.MoveLast
For ciclo = 1 to 10
    if NOT objRS.BOF then
      response.write  objRS("TITNOTICIA")& " "
      Response.Write "<BR> "
      objRS.moveprevious
     End If
Next

objRS.close
set objRS = nothing
set Conn = nothing

%>

ANY CLUE?
Message #2 by "Eduardo Porcel" <eporcel@l...> on Fri, 13 Dec 2002 00:12:48
The solution was to insert the following:
objRS.PageSize = 10
objRS.CursorLocation = adUseClient

Thanks anyway

Hope this help for others 




> Im getting the following error

> 
M> icrosoft OLE DB Provider for ODBC Drivers error '80040e24' 

> Rowset does not support fetching backward. 

> /gali/Noticia.asp, line 36 

> I´m trying to display records from the last to the first, I have another 
p> rogram that works perfect.
M> y code is as follows:

> <%@ Language=VBScript %>
<> % Option Explicit %>
<> !--#include file="ADOVBS.INC"-->

> <%
d> im Conn
d> im ciclo

> Set Conn = Server.CreateObject("ADODB.Connection")
C> 
onn.Open "DBQ=D:\FTP\lrsme\Database\cursosbd.mdb;DefaultDir=D:\FTP\lrsme\D
a> tabase;Driver={Microsoft Access Driver (*.mdb)}"

> Dim objRS
S> et objRS = Server.CreateObject("ADODB.Recordset")
o> bjRS.Open "NOTIC", Conn, , adLockReadOnly, adCmdTable

> objRS.MoveLast
F> or ciclo = 1 to 10
 >    if NOT objRS.BOF then
 >      response.write  objRS("TITNOTICIA")& " "
 >      Response.Write "<BR> "
 >      objRS.moveprevious
 >     End If
N> ext

> objRS.close
s> et objRS = nothing
s> et Conn = nothing

> %>

> ANY CLUE?

  Return to Index