ADODB.Recordset error "800a0cb3"
ADODB.Recordset error "800a0cb3"
am 25.03.2005 00:59:15 von Trym Bagger
Hi All:
I have just published the same pages to two different web sites (both
running Windows 2000 Server). One works perfectly OK, while the other
creates the following error:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a limitation of
the provider or of the selected cursortype.
The offending line is:
RS.AbsolutePage = intPageNum
RS is my current recordset
Had both web servers produced the error, I would think that something is
wrong with my code, but as mentioned before, only of them creates problems.
I can also run the code without problems on my local IIS (a Windows XP Pro
machine).
Any advice would greatly appreciated.
Thanks.
TB
Re: ADODB.Recordset error "800a0cb3"
am 25.03.2005 02:37:17 von reb01501
TB wrote:
> Hi All:
>
> I have just published the same pages to two different web sites (both
> running Windows 2000 Server). One works perfectly OK, while the other
> creates the following error:
>
> ADODB.Recordset error '800a0cb3'
> Current Recordset does not support bookmarks. This may be a
> limitation of the provider or of the selected cursortype.
>
> The offending line is:
>
> RS.AbsolutePage = intPageNum
>
You need a non-default cursor in order to use AbsolutePage. That means:
if using CursorLocation-adUseServer, you need a static, keyset or dynamic
cursor
If using CursorLocation = adUseClient. you will only get a static cursor
which supports bookmarks.
so, yes, the problem is in your code.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: ADODB.Recordset error "800a0cb3"
am 25.03.2005 08:37:41 von Trym Bagger
Thanks for your prompt reply.
The recordset opening line is:
RS.Open msql, Conn, 1,3
How should I change that one to make it work on all web servers?
Thanks
TB
"Bob Barrows [MVP]" wrote in message
news:eBFfusNMFHA.4028@tk2msftngp13.phx.gbl...
> TB wrote:
>> Hi All:
>>
>> I have just published the same pages to two different web sites (both
>> running Windows 2000 Server). One works perfectly OK, while the other
>> creates the following error:
>>
>> ADODB.Recordset error '800a0cb3'
>> Current Recordset does not support bookmarks. This may be a
>> limitation of the provider or of the selected cursortype.
>>
>> The offending line is:
>>
>> RS.AbsolutePage = intPageNum
>>
>
> You need a non-default cursor in order to use AbsolutePage. That means:
>
> if using CursorLocation-adUseServer, you need a static, keyset or dynamic
> cursor
>
> If using CursorLocation = adUseClient. you will only get a static cursor
> which supports bookmarks.
>
> so, yes, the problem is in your code.
>
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
Re: ADODB.Recordset error "800a0cb3"
am 25.03.2005 13:52:26 von reb01501
It's what happens before that line that's relevant.
Frankly, I would not be using the cursor to provide this functionality. It
requires too much overhead in the web server. If you need to implement
paging, you should look at the articles on Ken Schaeffer's
(www.adopenstatic.com) and Aaron Bertrand's (www.aspfaq.com) sites to see
more efficient solutions.
However, in order to support bookmarks you need to set the recordset's
CursorLocation or CursorType (or both) properties before opening it.
The ADO documentation can be found at msdn.microsoft.com/library (you can
either drill down through the table of contents to find it, or do a site
search for either of the properties I cited above). You should do a thorough
reading of the descriptions of these properties to gain an understanding of
the ramifications of using each of the non-default settings.
My preference would be to use a static cursor, since that is the cheapest
cursor that is likely to support bookmarks. Whether or not a server-side or
client-side cursor is called for depends on the amount of data that would be
retrieved from the database if ALL the records that passed your sql
statement's filter were retrieved all at once.
The reason the error occurs on one server but not another is proabably
attributable to
a) different versions of MDAC on each machine
b) corrupted ADO files
c) different versions of the OLE DB provider you are using
By setting the cursor type/location properties explicitly, you will make you
app more server-proof.
Bob Barrows
TB wrote:
> Thanks for your prompt reply.
>
> The recordset opening line is:
>
> RS.Open msql, Conn, 1,3
>
> How should I change that one to make it work on all web servers?
>
> Thanks
>
> TB
>
>
> "Bob Barrows [MVP]" wrote in message
> news:eBFfusNMFHA.4028@tk2msftngp13.phx.gbl...
>> TB wrote:
>>> Hi All:
>>>
>>> I have just published the same pages to two different web sites
>>> (both running Windows 2000 Server). One works perfectly OK, while
>>> the other creates the following error:
>>>
>>> ADODB.Recordset error '800a0cb3'
>>> Current Recordset does not support bookmarks. This may be a
>>> limitation of the provider or of the selected cursortype.
>>>
>>> The offending line is:
>>>
>>> RS.AbsolutePage = intPageNum
>>>
>>
>> You need a non-default cursor in order to use AbsolutePage. That
>> means: if using CursorLocation = adUseServer, you need a static, keyset
>> or
>> dynamic cursor
>>
>> If using CursorLocation = adUseClient. you will only get a static
>> cursor which supports bookmarks.
>>
>> so, yes, the problem is in your code.
>>
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: ADODB.Recordset error "800a0cb3"
am 27.03.2005 08:50:54 von Trym Bagger
Thanks a lot. I have studied the issue, and have changed the cursor type. In
a future update, I will follow your advice and simply use another form of
paging. Thanks again.
TB
"Bob Barrows [MVP]" wrote in message
news:%23C0h%23lTMFHA.1176@TK2MSFTNGP12.phx.gbl...
> It's what happens before that line that's relevant.
>
> Frankly, I would not be using the cursor to provide this functionality. It
> requires too much overhead in the web server. If you need to implement
> paging, you should look at the articles on Ken Schaeffer's
> (www.adopenstatic.com) and Aaron Bertrand's (www.aspfaq.com) sites to see
> more efficient solutions.
>
> However, in order to support bookmarks you need to set the recordset's
> CursorLocation or CursorType (or both) properties before opening it.
> The ADO documentation can be found at msdn.microsoft.com/library (you can
> either drill down through the table of contents to find it, or do a site
> search for either of the properties I cited above). You should do a
> thorough reading of the descriptions of these properties to gain an
> understanding of the ramifications of using each of the non-default
> settings.
>
> My preference would be to use a static cursor, since that is the cheapest
> cursor that is likely to support bookmarks. Whether or not a server-side
> or client-side cursor is called for depends on the amount of data that
> would be retrieved from the database if ALL the records that passed your
> sql statement's filter were retrieved all at once.
>
>
> The reason the error occurs on one server but not another is proabably
> attributable to
> a) different versions of MDAC on each machine
> b) corrupted ADO files
> c) different versions of the OLE DB provider you are using
>
> By setting the cursor type/location properties explicitly, you will make
> you app more server-proof.
>
> Bob Barrows
>
> TB wrote:
>> Thanks for your prompt reply.
>>
>> The recordset opening line is:
>>
>> RS.Open msql, Conn, 1,3
>>
>> How should I change that one to make it work on all web servers?
>>
>> Thanks
>>
>> TB
>>
>>
>> "Bob Barrows [MVP]" wrote in message
>> news:eBFfusNMFHA.4028@tk2msftngp13.phx.gbl...
>>> TB wrote:
>>>> Hi All:
>>>>
>>>> I have just published the same pages to two different web sites
>>>> (both running Windows 2000 Server). One works perfectly OK, while
>>>> the other creates the following error:
>>>>
>>>> ADODB.Recordset error '800a0cb3'
>>>> Current Recordset does not support bookmarks. This may be a
>>>> limitation of the provider or of the selected cursortype.
>>>>
>>>> The offending line is:
>>>>
>>>> RS.AbsolutePage = intPageNum
>>>>
>>>
>>> You need a non-default cursor in order to use AbsolutePage. That
>>> means: if using CursorLocation = adUseServer, you need a static, keyset
>>> or
>>> dynamic cursor
>>>
>>> If using CursorLocation = adUseClient. you will only get a static
>>> cursor which supports bookmarks.
>>>
>>> so, yes, the problem is in your code.
>>>
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>