Forum Moderators: open

Message Too Old, No Replies

ASP/MySQL Paging error - help please?

Having trouble paging through records, has to do with cursor type I believe

         

Drewlin

7:40 pm on Apr 3, 2003 (gmt 0)

10+ Year Member



I am using ASP to connect to a MySQL database, and can display one page of records, but when I try to go to the "next" page, I get a 404 error.

Here is my code:

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "Driver={Mysql}; Server=my_server; Data Source=my_dsn; UID=tom; PWD=parrot"
Set RSCatalogue = Server.CreateObject( "ADODB.Recordset" )
RSCatalogue.ActiveConnection = Con
RSCatalogue.CursorType = adOpenStatic
RSCatalogue.CursorLocation = aduseClient
RSCatalogue.PageSize = 6
sqlString = "Select * From tblCatalogue Order By Item;"
RSCatalogue.Open sqlString%>

<!--SET ADO PAGING VARIABLE-->
<%RSCatalogue.AbsolutePage = CurrentPage%>

<!--SET PAGING LIMITS TO THE FIRST AND LAST PAGES-->
<%If CurrentPage=1 then PreviousPage = CurrentPage else PreviousPage = CurrentPage - 1%>
<%If CurrentPage = RSCatalogue.PageCount then NextPage = CurrentPage else NextPage = Currentpage + 1%>

Like I said, the above code will allow me to connect and pull 6 records to display on the first page, but will not allow me to go to the next or previous page.

If I take this out:

RSCatalogue.CursorLocation = aduseClient

then I get this error:

ADODB.Recordset error '800a0cb3'

Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

/index4.asp, line 43 (line 43 is where I set my ADO paging variable)

Any ideas? I have tried to set the cursor type on the connection instead of the recordset as well, and have the same problem.

Any help is much appreciated!

Drewlin

Drewlin

8:48 pm on Apr 3, 2003 (gmt 0)

10+ Year Member



oh how embarassing - I just had some bad links on my previous and next buttons!

Nevermind, I guess I should quit coding at 3am and get some rest...