-
Rowset does not support fetching backward
My ASP page should view all articles posted on a given date,
and that now works fine.
However, this leads me to another problem:
The first article (posted 9:11) shows at the top of the list,
and the last (posted 11:37) shows at the bottom.
I want to turn it all around, so the fresh articles shows at the top,
so I tried this code:
rs.movelast
while not rs.bof
response.write "<p ALIGN=justify CLASS=text>"
response.write rs("Rubrik") & "</b><br>"
response.write rs("text") & "<br>"
response.write "</p>"
rs.moveprevious
wend
But then I receive this error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E24)
Rowset does not support fetching backward.
/hemsida/index.asp, line 76
Any suggestions?
-
Re: Rowset does not support fetching backward
Afraid my references are at the office (and I'm not), but I suspect it's a
problem with how you're creating the recordset. The default is forward-only,
but there are parameters you can specify to get around this.
--
Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/
John K. <john.k@home.se> wrote in message news:3948019e$1@news.devx.com...
> My ASP page should view all articles posted on a given date,
> and that now works fine.
> However, this leads me to another problem:
> The first article (posted 9:11) shows at the top of the list,
> and the last (posted 11:37) shows at the bottom.
> I want to turn it all around, so the fresh articles shows at the top,
> so I tried this code:
>
> rs.movelast
> while not rs.bof
> response.write "<p ALIGN=justify CLASS=text>"
> response.write rs("Rubrik") & "</b><br>"
> response.write rs("text") & "<br>"
> response.write "</p>"
> rs.moveprevious
> wend
>
> But then I receive this error:
>
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E24)
> Rowset does not support fetching backward.
> /hemsida/index.asp, line 76
>
> Any suggestions?
>
>
-
Re: Rowset does not support fetching backward
I am a novice when it comes to databases,
maybe you could please tell me more about this.
Thanks!
--
John Knoop . john.k@home.se
~~~~~~~~~~~~~~~~~~~~~~~
"Douglas J. Steele" <djsteele@idirect.com> wrote in message
news:39481a15$1@news.devx.com...
> Afraid my references are at the office (and I'm not), but I suspect it's a
> problem with how you're creating the recordset. The default is
forward-only,
> but there are parameters you can specify to get around this.
>
> --
>
> Doug Steele, Microsoft Access MVP
> Beer, Wine and Database Programming. What could be better?
> Visit "Doug Steele's Beer and Programming Emporium"
> http://I.Am/DougSteele/
>
>
> John K. <john.k@home.se> wrote in message news:3948019e$1@news.devx.com...
> > My ASP page should view all articles posted on a given date,
> > and that now works fine.
> > However, this leads me to another problem:
> > The first article (posted 9:11) shows at the top of the list,
> > and the last (posted 11:37) shows at the bottom.
> > I want to turn it all around, so the fresh articles shows at the top,
> > so I tried this code:
> >
> > rs.movelast
> > while not rs.bof
> > response.write "<p ALIGN=justify CLASS=text>"
> > response.write rs("Rubrik") & "</b><br>"
> > response.write rs("text") & "<br>"
> > response.write "</p>"
> > rs.moveprevious
> > wend
> >
> > But then I receive this error:
> >
> > Microsoft OLE DB Provider for ODBC Drivers (0x80040E24)
> > Rowset does not support fetching backward.
> > /hemsida/index.asp, line 76
> >
> > Any suggestions?
> >
> >
>
>
-
Re: Rowset does not support fetching backward
John,
Doug is right, you could change to a Dynamic/Dynaset recordset, but that is
slower than the forward only. Since you really only need to read through the
rs once (not move all around), you should use the forward-only (the
default).
So, instead of changing the way you access the recordset - get the recordset
built in the order you want.
I'm assuming from your previous code that rs!tid is the posted time. If so
change the SQL to "SELECT ... WHERE ... ORDER BY tid DESC". That tells it to
order the records by tid in descending ordering.
That should do the trick.
If you really need to change the cursor type you specify your recordset this
way :
rs.open [sql], [connection], [cursor type], [lock type]
cursor types are :
0 Forward-only : can only move forward (fast, low memory)
1 Keyset : can move around, don't see added records by others
2 Dynaset : can move around, see all adds and edits by other users
3 Static : can mover around, is static copy - you don't see
adds/edits/deletes by other users.
use the number to specify which one you want
ie for Dynaset :
rs.open sql, conn, 2
HTH,
-Jason
John K. <john.k@home.se> wrote in message news:3948b66c$1@news.devx.com...
> I am a novice when it comes to databases,
> maybe you could please tell me more about this.
>
> Thanks!
>
> --
> John Knoop . john.k@home.se
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> "Douglas J. Steele" <djsteele@idirect.com> wrote in message
> news:39481a15$1@news.devx.com...
> > Afraid my references are at the office (and I'm not), but I suspect it's
a
> > problem with how you're creating the recordset. The default is
> forward-only,
> > but there are parameters you can specify to get around this.
> >
> > --
> >
> > Doug Steele, Microsoft Access MVP
> > Beer, Wine and Database Programming. What could be better?
> > Visit "Doug Steele's Beer and Programming Emporium"
> > http://I.Am/DougSteele/
> >
> >
> > John K. <john.k@home.se> wrote in message
news:3948019e$1@news.devx.com...
> > > My ASP page should view all articles posted on a given date,
> > > and that now works fine.
> > > However, this leads me to another problem:
> > > The first article (posted 9:11) shows at the top of the list,
> > > and the last (posted 11:37) shows at the bottom.
> > > I want to turn it all around, so the fresh articles shows at the top,
> > > so I tried this code:
> > >
> > > rs.movelast
> > > while not rs.bof
> > > response.write "<p ALIGN=justify CLASS=text>"
> > > response.write rs("Rubrik") & "</b><br>"
> > > response.write rs("text") & "<br>"
> > > response.write "</p>"
> > > rs.moveprevious
> > > wend
> > >
> > > But then I receive this error:
> > >
> > > Microsoft OLE DB Provider for ODBC Drivers (0x80040E24)
> > > Rowset does not support fetching backward.
> > > /hemsida/index.asp, line 76
> > >
> > > Any suggestions?
> > >
> > >
> >
> >
>
>
-
Re: Rowset does not support fetching backward
What is cursor type?
"JasonL" <jasonl@wirelesszone.com> wrote in message
news:39490d32$1@news.devx.com...
> John,
> Doug is right, you could change to a Dynamic/Dynaset recordset, but that
is
> slower than the forward only. Since you really only need to read through
the
> rs once (not move all around), you should use the forward-only (the
> default).
> So, instead of changing the way you access the recordset - get the
recordset
> built in the order you want.
> I'm assuming from your previous code that rs!tid is the posted time. If so
> change the SQL to "SELECT ... WHERE ... ORDER BY tid DESC". That tells it
to
> order the records by tid in descending ordering.
> That should do the trick.
> If you really need to change the cursor type you specify your recordset
this
> way :
> rs.open [sql], [connection], [cursor type], [lock type]
> cursor types are :
> 0 Forward-only : can only move forward (fast, low memory)
> 1 Keyset : can move around, don't see added records by others
> 2 Dynaset : can move around, see all adds and edits by other users
> 3 Static : can mover around, is static copy - you don't see
> adds/edits/deletes by other users.
> use the number to specify which one you want
> ie for Dynaset :
> rs.open sql, conn, 2
> HTH,
> -Jason
> John K. <john.k@home.se> wrote in message news:3948b66c$1@news.devx.com...
> > I am a novice when it comes to databases,
> > maybe you could please tell me more about this.
> >
> > Thanks!
> >
> > --
> > John Knoop . john.k@home.se
> > ~~~~~~~~~~~~~~~~~~~~~~~
> >
> > "Douglas J. Steele" <djsteele@idirect.com> wrote in message
> > news:39481a15$1@news.devx.com...
> > > Afraid my references are at the office (and I'm not), but I suspect
it's
> a
> > > problem with how you're creating the recordset. The default is
> > forward-only,
> > > but there are parameters you can specify to get around this.
> > >
> > > --
> > >
> > > Doug Steele, Microsoft Access MVP
> > > Beer, Wine and Database Programming. What could be better?
> > > Visit "Doug Steele's Beer and Programming Emporium"
> > > http://I.Am/DougSteele/
> > >
> > >
> > > John K. <john.k@home.se> wrote in message
> news:3948019e$1@news.devx.com...
> > > > My ASP page should view all articles posted on a given date,
> > > > and that now works fine.
> > > > However, this leads me to another problem:
> > > > The first article (posted 9:11) shows at the top of the list,
> > > > and the last (posted 11:37) shows at the bottom.
> > > > I want to turn it all around, so the fresh articles shows at the
top,
> > > > so I tried this code:
> > > >
> > > > rs.movelast
> > > > while not rs.bof
> > > > response.write "<p ALIGN=justify CLASS=text>"
> > > > response.write rs("Rubrik") & "</b><br>"
> > > > response.write rs("text") & "<br>"
> > > > response.write "</p>"
> > > > rs.moveprevious
> > > > wend
> > > >
> > > > But then I receive this error:
> > > >
> > > > Microsoft OLE DB Provider for ODBC Drivers (0x80040E24)
> > > > Rowset does not support fetching backward.
> > > > /hemsida/index.asp, line 76
> > > >
> > > > Any suggestions?
> > > >
> > > >
> > >
> > >
> >
> >
>
>
-
Re: Rowset does not support fetching backward
"John K." <john.k@home.se> wrote in message
news:3948019e$1@news.devx.com...
> My ASP page should view all articles posted on a given date,
> and that now works fine.
> However, this leads me to another problem:
> The first article (posted 9:11) shows at the top of the list,
> and the last (posted 11:37) shows at the bottom.
> I want to turn it all around, so the fresh articles shows at the
top,
> so I tried this code:
Simply sort your Recordset in the other direction:
"SELECT article,date FROM articles ORDER BY date DESC"
-Devin Knutson
-WebNW, LLC
-
Re: Rowset does not support fetching backward
Cursor type determines what features your recordset will support. The more
features you get, usually the lower the performance. In addition, cursors
can either be client side or server side (meaning the cursor is created on
either the client or the server). This is a fairly large topic. If you
need more, I suggest you start by reading the ADO documentation. If you
need help understanding that, let us know.
John K. wrote in message <394930fd@news.devx.com>...
>What is cursor type?
>
>
>"JasonL" <jasonl@wirelesszone.com> wrote in message
>news:39490d32$1@news.devx.com...
>> John,
>> Doug is right, you could change to a Dynamic/Dynaset recordset, but that
>is
>> slower than the forward only. Since you really only need to read through
>the
>> rs once (not move all around), you should use the forward-only (the
>> default).
>> So, instead of changing the way you access the recordset - get the
>recordset
>> built in the order you want.
>> I'm assuming from your previous code that rs!tid is the posted time. If
so
>> change the SQL to "SELECT ... WHERE ... ORDER BY tid DESC". That tells it
>to
>> order the records by tid in descending ordering.
>> That should do the trick.
>> If you really need to change the cursor type you specify your recordset
>this
>> way :
>> rs.open [sql], [connection], [cursor type], [lock type]
>> cursor types are :
>> 0 Forward-only : can only move forward (fast, low memory)
>> 1 Keyset : can move around, don't see added records by others
>> 2 Dynaset : can move around, see all adds and edits by other users
>> 3 Static : can mover around, is static copy - you don't see
>> adds/edits/deletes by other users.
>> use the number to specify which one you want
>> ie for Dynaset :
>> rs.open sql, conn, 2
>> HTH,
>> -Jason
>> John K. <john.k@home.se> wrote in message
news:3948b66c$1@news.devx.com...
>> > I am a novice when it comes to databases,
>> > maybe you could please tell me more about this.
>> >
>> > Thanks!
>> >
>> > --
>> > John Knoop . john.k@home.se
>> > ~~~~~~~~~~~~~~~~~~~~~~~
>> >
>> > "Douglas J. Steele" <djsteele@idirect.com> wrote in message
>> > news:39481a15$1@news.devx.com...
>> > > Afraid my references are at the office (and I'm not), but I suspect
>it's
>> a
>> > > problem with how you're creating the recordset. The default is
>> > forward-only,
>> > > but there are parameters you can specify to get around this.
>> > >
>> > > --
>> > >
>> > > Doug Steele, Microsoft Access MVP
>> > > Beer, Wine and Database Programming. What could be better?
>> > > Visit "Doug Steele's Beer and Programming Emporium"
>> > > http://I.Am/DougSteele/
>> > >
>> > >
>> > > John K. <john.k@home.se> wrote in message
>> news:3948019e$1@news.devx.com...
>> > > > My ASP page should view all articles posted on a given date,
>> > > > and that now works fine.
>> > > > However, this leads me to another problem:
>> > > > The first article (posted 9:11) shows at the top of the list,
>> > > > and the last (posted 11:37) shows at the bottom.
>> > > > I want to turn it all around, so the fresh articles shows at the
>top,
>> > > > so I tried this code:
>> > > >
>> > > > rs.movelast
>> > > > while not rs.bof
>> > > > response.write "<p ALIGN=justify CLASS=text>"
>> > > > response.write rs("Rubrik") & "</b><br>"
>> > > > response.write rs("text") & "<br>"
>> > > > response.write "</p>"
>> > > > rs.moveprevious
>> > > > wend
>> > > >
>> > > > But then I receive this error:
>> > > >
>> > > > Microsoft OLE DB Provider for ODBC Drivers (0x80040E24)
>> > > > Rowset does not support fetching backward.
>> > > > /hemsida/index.asp, line 76
>> > > >
>> > > > Any suggestions?
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>>
>>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks