Web Design and Development Forums

AbsolutePage in MySQL

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


Go Back   Webforumz.com > Databases > MySQL

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Feb 11th, 2008, 00:23   #1 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
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.
__________________

Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Feb 12th, 2008, 02:37   #2 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
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 edited by Monie; Feb 12th, 2008 at 02:40.
Monie is offline  
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
Rate This Thread
Rate This Thread:

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 ccandeland MSSQL & Access 3 Sep 3rd, 2007 21:31
Using PHP/MYSQL on Mac OSX jonnymorris New to Web Design 0 Jul 5th, 2007 14:55
MySQL Freelancer MySQL 3 Nov 13th, 2006 08:55
help with php and mysql robukni MySQL 30 Jan 30th, 2006 22:58



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 07:35.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59