Ask a Question related to ASP Database, Design and Development.
-
M P #1
DB Paging not working
Whats wrong with my code? I have my AccessDB with 1000 records on tblItems.
When I try to write the Pagecount on the screen, it writes "-1". Hope you
might help.
<%
Set conn= Server.CreateObject("ADODB.Connection")
conn.Open "FileDSN=file.dsn"
strSQL = "SELECT * FROM tblItems ORDER BY Category "
strPageSize= 20
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
ObjPagingRS.PageSize = strPageSize
ObjPagingRS.CacheSize = strPageSize
ObjPagingRS.Open strSQL, conn
strPageCount= ObjPagingRS.PageCount
Response.Write "<BR>"
Response.Write "Page Size is " & strPageSize
Response.Write "<BR>"
Response.Write "Page Count is " & strPageCount
Response.Write "<BR>"
Response.Write "Current Page is " & strPageCurrent
Response.Write "<BR>"
..
..
..
%>
M P Guest
-
Macromedia Flash Player installed and working properly suddenlys stops working..
No idea what has caused the Flash player to stop working. This is not my machine but a relatives who has asked for help over the T'giving... -
DataGris Paging not working (event not firing)
Hello, It seems that no matter what I do, I cannot get paging working on my datagrid. I'll try to explain as best as I can how my program... -
Why is my Paging not working in my DataGrid?
Question: Why can't I enable paging in Datagrid? Answer: You must check 'AllowPaging' You must add code to handle the PageIndexChanged Event. ... -
Paging not working in a datagrid
I'm trying to use paging in a datagrid, but I can't get past the "cannot compute Count for a data source that does not implement ICollection"... -
Dreamweaver MX Paging Not Working Correctly - HELP!
Try using a search form with a METHOD of GET. Then you can request the querystring instead of the form variables. I'm not quite sure how you'd do... -
Bullschmidt #2
Re: DB Paging not working
I wonder if an adOpenStatic (3) instead of the default adOpenForwardOnly
(0) CursorType would help as is used here:
Database Paging
[url]http://www.asp101.com/samples/db_paging.asp[/url]
Uses PageSize method of recordset.
Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
[url]http://www.Bullschmidt.com[/url]
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Devdex [url]http://www.devdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest
-
Aaron [SQL Server MVP] #3
Re: DB Paging not working
[url]http://www.aspfaq.com/2120[/url] (paging methods)
[url]http://www.aspfaq.com/2126[/url] (get rid of the DSN)
[url]http://www.aspfaq.com/2096[/url] (don't use SELECT *)
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"M P" <mark@textguru.ph> wrote in message
news:eWeHXbbWEHA.3472@TK2MSFTNGP09.phx.gbl...tblItems.> Whats wrong with my code? I have my AccessDB with 1000 records on> When I try to write the Pagecount on the screen, it writes "-1". Hope you
> might help.
>
> <%
> Set conn= Server.CreateObject("ADODB.Connection")
> conn.Open "FileDSN=file.dsn"
>
> strSQL = "SELECT * FROM tblItems ORDER BY Category "
>
> strPageSize= 20
>
> Set objPagingRS = Server.CreateObject("ADODB.Recordset")
> ObjPagingRS.PageSize = strPageSize
> ObjPagingRS.CacheSize = strPageSize
> ObjPagingRS.Open strSQL, conn
>
> strPageCount= ObjPagingRS.PageCount
>
>
> Response.Write "<BR>"
> Response.Write "Page Size is " & strPageSize
> Response.Write "<BR>"
> Response.Write "Page Count is " & strPageCount
> Response.Write "<BR>"
> Response.Write "Current Page is " & strPageCurrent
> Response.Write "<BR>"
>
> .
> .
> .
>
> %>
>
>
Aaron [SQL Server MVP] Guest



Reply With Quote

