Jag har stora problem med paging, använder MySQL databas. Inget jag försöker med vill funka. Maybe this is a limitation of the MySQL ODBC driver. Pagin
Får bara...
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
Har provat en massa olika saker, antingen får jag detta felet eller så skriver den inte ut några poster.
<%
Set MzConnect = Server.CreateObject("ADODB.Connection")
MzConnect.Open = "driver={MySQL ODBC 3.51 Driver};SERVER="
intPageSize = 10
intPage = Request.QueryString("page")
If intPage = "" Then intPage = 1
strSQL = "Select * From forum where forumid = "& Request.QueryString("id") &" and inlaggid = 0 order by datum desc"
Set RecSet = Server.CreateObject("ADODB.Recordset")
With RecSet
.ActiveConnection = MzConnect
.Source = strSQL
.PageSize = intPageSize
.CursorType = 3
.LockType = 1
.Open
End With
If Not RecSet.EOF Then
RecSet.AbsolutePage = intPage
intTotalPages = RecSet.PageCount
Do Until RecSet.EOF OR intCounter >= intPageSize
intCounter = intCounter + 1
%>
Det som skall skrivas ut hamnar här.
<%
Recset.MoveNext
Loop
end if
RecSet.Close
MzConnect.Close
Set RecSet = nothing
Set MzConnect = nothing
%>
Sv: Pagin
Try another way. MySQL supports "limit" command.
select * from table_name limit x, y
(x - position of the first record in your resultset
y - page size)