AbsolutePage in MySQL

This is a discussion on "AbsolutePage in MySQL" within the Databases section. This forum, and the thread "AbsolutePage in MySQL are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Feb 11th, 2008, 00:23
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
AbsolutePage in MySQL

I have done my page paging which will display certain amount of data from my ACCESS database. Now I am migrating my database to MySQL and it seems that MySQL do not support AbsolutePage.

HTML: Select all
If Not rs.EOF Then
    rs.MoveFirst
    rs.PageSize = NumPerPage
    TotalPages = rs.PageCount

    'Set the absolute (current) page
    rs.AbsolutePage = CurrentPage
End If
This code works perfectly in ACCESS database
This is the error message that I get:
Quote:
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 12th, 2008, 02:37
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: AbsolutePage in MySQL

Yes, I am happily solving this thread
It all about the cursor type that causes all that error! What I do is to force ADO to construct a static cursor by specifying a client-side cursor!!!

My previous Database Connection (updated with the static cursor):
Code: Select all
Dim connString, rs, conn
connString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER="& DB_SERVER &"; DATABASE="& DB_NAME &"; OPTION=4; UID="& DB_USER &"; PASSWORD="& DB_PASS &";"
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.cursorlocation = 3
conn.Open(connString)
And the If statement just works FINE

Code: Select all
If Not rs.EOF Then
    rs.MoveFirst
    rs.PageSize = NumPerPage
    TotalPages = rs.PageCount

    rs.AbsolutePage = CurrentPage
End If
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Feb 12th, 2008 at 02:40.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql help nashultz07 Databases 4 Jul 27th, 2007 09:11
Mysql/php marie2007 PHP Forum 7 Jul 10th, 2007 13:20
Mysql Paul00000001 Databases 7 Sep 13th, 2006 21:48
ASP and MYSQL QuikFrozen Classic ASP 3 Aug 16th, 2006 17:58
help with php and mysql robukni Databases 30 Jan 30th, 2006 22:58


All times are GMT. The time now is 22:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42