How to insert a reference to a user in my entry?
ASP Access Recordset Paging
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > ASP web-programming > ASP Access Recordset Paging 16 September 2008 05:07:18

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

ASP Access Recordset Paging

Yosi 16 September 2008 05:07:18
 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") & "<br>"
RS.MoveNext
Wend
RS.Close
SET RS = NOTHING
Conn.close
Set Conn = NOTHING

Many thanks in advance,

Yosi.



Add comment
Bob Barrows 5 August 2008 15:00:45 permanent link ]
 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.c­om/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.c­om/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"


Add comment
E . L . 25 August 2008 15:52:02 permanent link ]
 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?
Add comment
Bob Barrows 25 August 2008 16:03:20 permanent link ]
 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.


Add comment
E . L . 25 August 2008 16:28:03 permanent link ]
 Thanks for the quick reply.

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

2. The code of my connection to the DB 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
Add comment
Bob Barrows 25 August 2008 17:01:10 permanent link ]
 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 DB 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_<machine_name>­ 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.


Add comment
E . L . 25 August 2008 18:06:02 permanent link ]
 Thanks a lot! You've been really helpful.

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

I still don't understand why I didn't have access to disc C.
Add comment
Bullschmidt 16 September 2008 05:07:18 permanent link ]
 I'm going to guess that the underlying recordset is read-only such as
based upon multiple tables...

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschm­idt.com
Access Database Sample, Web Database Sample, ASP Design Tips

*** Sent via Developersdex http://www.develope­rsdex.com ***
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > ASP web-programming > ASP Access Recordset Paging 16 September 2008 05:07:18

see also:
A request from C/C++ programmer
Static Linked on Linux and Win32
AntiVirus scan results
пройди тесты:
see also:
sell electronic such as nokia n95,apple…
prist list of electronic

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .