צפיות
תשובות
שאלה לגבי חלוקה לעמודים ו GETROWS
האם אני יכול לחק רקורדסט לעמודים ואז לעשות
GETROWS
ולקבל רק את הרשומות שנמצאות בעמודים האלו? כי זה לא הצליח לי.
זה מציג לי עדיין את כל הרשומות…
הנה הקוד:
'open connection to the father messages
Sqls="Select * From forum where msg_father_id=0 order by msg_last_time desc"
Set rsmes=Server.CreateObject("ADODB.Recordset")
rsmes.Open Sqls, Conn, 3, 3
'partition to pages
currpage = 1
numrecs = 3
If not Request.QueryString("currpage") = "" then
currPage = Request.QueryString("currpage")
End if
rsmes.PageSize = numRecs
rsmes.CacheSize = numRecs
If not rsmes.EOF then
pcount = rsmes.PageCount
rsmes.AbsolutePage = currpage
End if
recfather = rsmes.GetRows()
rsmes.Close
set rsmes = nothing
3 תשובות
נסה כך
'partition to pages
currpage = 1
numrecs = 3
'open connection to the father messages
Sqls="Select * From forum where msg_father_id=0 order by msg_last_time desc"
Set rsmes=Server.CreateObject("ADODB.Recordset")
rsmes.CacheSize = rsmes.PageSize
rsmes.PageSize = numRecs
rsmes.Open Sqls, Conn, 3, 1
If not Request.QueryString("currpage") = "" then
currPage = Request.QueryString("currpage")
End if
If not rsmes.EOF then
pcount = rsmes.PageCount
rsmes.AbsolutePage = currpage
End if
recfather = rsmes.GetRows()
rsmes.Close
set rsmes = nothing
לא עובד… אולי חלוקה ברמת ה SQL?
מישהו יכול להראות לי איך אני צריך לעשות את הוצאת הנתונים.
לא משנה, תודה. אני מעביר קודם ב…
GETROWS
את כל הרשומות ואז עושה חלוקה…