ASP Access Recordset Paging

This is a discussion on ASP Access Recordset Paging within the sqlserver-odbc forums in Microsoft SQL Server category; Hi all, I have access database file with 2 tables, the tables have the same columns but with different data, and I have 2 asp files that show the content of each table with paging recordset, they have the same code, but only one asp works, when I try to open the second page i got this error: Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. it doesn't make sense how one asp page with the same code working, and the other not, ...

Go Back   Database Forum > Microsoft SQL Server > sqlserver-odbc

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-05-2008, 08:37 AM
Default ASP Access Recordset Paging

Hi all,

I have access database file with 2 tables,
the tables have the same columns but with different data,
and I have 2 asp files that show the content of each table with paging
recordset,
they have the same code, but only one asp works,
when I try to open the second page i got this error:

Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks.
This may be a limitation of the provider or of the selected cursortype.

it doesn't make sense how one asp page with the same code working,
and the other not, any idea wht it happend ?

the code:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.mode = 3
FilePath = "C:\Inetpub\wwwroot\database.mdb"
Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath & ";
Set RS = Server.CreateObject("ADODB.Recordset")
RS.CursorType = adOpenStatic
RS.PageSize = 5
RS.Open "SELECT * FROM table1", Conn
RS.AbsolutePage = cp
rc = 0
While not RS.EOF and rc < RS.PageSize
response.write RS("FirstName") & "
"
RS.MoveNext
Wend
RS.Close
SET RS = NOTHING
Conn.close
Set Conn = NOTHING

Many thanks in advance,

Yosi.



Reply With Quote
  #2  
Old 08-05-2008, 09:00 AM
Default Re: ASP Access Recordset Paging

Yosi wrote:
> Hi all,
>
> I have access database file with 2 tables,
> the tables have the same columns but with different data,
> and I have 2 asp files that show the content of each table with
> paging recordset,
> they have the same code, but only one asp works,
> when I try to open the second page i got this error:
>
> Error Type:
> ADODB.Recordset (0x800A0CB3)
> Current Recordset does not support bookmarks.
> This may be a limitation of the provider or of the selected
> cursortype.
> it doesn't make sense how one asp page with the same code working,
> and the other not, any idea wht it happend ?


Well, there has to be something different ...

>
> the code:
>
> Set Conn = Server.CreateObject("ADODB.Connection")
> Conn.mode = 3
> FilePath = "C:\Inetpub\wwwroot\database.mdb"
> Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath
> & ";


Probably nothing to do with your problem but ...
http://www.aspfaq.com/show.asp?id=2126

> Set RS = Server.CreateObject("ADODB.Recordset")
> RS.CursorType = adOpenStatic


This cursor type should be supporting bookmarks. Verify that the provider
was able to give you this cursor type by checking it after you open the
recordset:

Response.Write RS.CursorType

> RS.PageSize = 5
> RS.Open "SELECT * FROM table1", Conn


Again, nothing to do with your problem but:
http://www.aspfaq.com/show.asp?id=2096

There seems to be no reason not to use a disconnected client-side cursor
here:

RS.CursorLocation = 3 'adUseClient
RS.PageSize = 5
RS.Open "SELECT * FROM table1",,, Conn, 1
Set RS.ActiveConnection = Nothing
Conn.Close

RS.AbsolutePage = cp
etc.


--
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"


Reply With Quote
  #3  
Old 08-25-2008, 09:52 AM
Default Re: ASP Access Recordset Paging

Hi,

I'm having a different problem, but the same error message (ADODB.Recordset
(0x800A0CB3) ).

I tried what you suggested, to verify that the provider gave me the cursor
type I had written.

So here's what i wrote:
rs.open sqlStr, con, 3,3

and i got cursor type=0, locktype=1.

Why is that? and what can I do about it?
Reply With Quote
  #4  
Old 08-25-2008, 10:03 AM
Default Re: ASP Access Recordset Paging

e.l. wrote:
> Hi,
>
> I'm having a different problem, but the same error message
> (ADODB.Recordset (0x800A0CB3) ).
>
> I tried what you suggested, to verify that the provider gave me the
> cursor type I had written.
>
> So here's what i wrote:
> rs.open sqlStr, con, 3,3
>
> and i got cursor type=0, locktype=1.
>
> Why is that? and what can I do about it?


We can't answer without seeing:
1. your database type and version
2. your connection string
Here is the key line in the CursorType article in the documentation:
"If a provider does not support the requested cursor type, it may return
another cursor type. "
That is why we need to see your connection string

3. the code used to instantiate your recordset and set its intial
properties
4. it might help to see what is contained in sqlStr

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Reply With Quote
  #5  
Old 08-25-2008, 10:28 AM
Default Re: ASP Access Recordset Paging

Thanks for the quick reply.

1. I use MS Office Access 2003 (11.8166.8202) SP3

2. The code of my connection to the Database and the RS:

dim SQLstr
set con = server.CreateObject ("adodb.connection")
con.open "provider = microsoft.jet.oledb.4.0; data source = c:\ak\Akel.mdb"

set rs = server.CreateObject ("adodb.recordset")
SQLstr = "SELECT * FROM tblProperty"
rs.Open SQLstr, con, 3,3
Reply With Quote
  #6  
Old 08-25-2008, 11:01 AM
Default Re: ASP Access Recordset Paging

e.l. wrote:
> Thanks for the quick reply.
>
> 1. I use MS Office Access 2003 (11.8166.8202) SP3
>
> 2. The code of my connection to the Database and the RS:
>
> dim SQLstr
> set con = server.CreateObject ("adodb.connection")
> con.open "provider = microsoft.jet.oledb.4.0; data source =
> c:\ak\Akel.mdb"


You are not using odbc, so you should have removed those groups from the
crosspost.
>
> set rs = server.CreateObject ("adodb.recordset")
> SQLstr = "SELECT * FROM tblProperty"
> rs.Open SQLstr, con, 3,3


I haven't used Access in a while and I don't have time to test this,
but, from what I can see, you should be getting a static server-side
cursor with optimistic locking. I really cannot see why the provider is
giving you the default forward-only, read-only cursor. My suggestion
would be to change the cursor location to adUseClient (3) which will
force a static cursor to be opened.

Oh, and make sure all database users have Modify permissions for that ak
folder. If your website uses Anonymous access, then the
IUSR_ account needs to be granted that permission.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Reply With Quote
  #7  
Old 08-25-2008, 12:06 PM
Default Re: ASP Access Recordset Paging

Thanks a lot! You've been really helpful.

What eventually solved the problem was moving the Database from
C:\akel\akel.mdb
to
D:\akel\akel.mdb

I still don't understand why I didn't have access to disc C.
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 03:26 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.