Author |
Topic |
|
apswater
VP-CART Super User
444 Posts |
Posted - March 01 2007 : 01:31:57
|
I am trying to use .pagesize to limit output.
here is part of the code :
set oConnMw1=Server.CreateObject("ADODB.Connection") oConnMw1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=abc.mdb"
set rsMw1=Server.CreateObject("ADODB.recordset")
mysqlMw1 = "SELECT * FROM products WHERE cprice = 0"
rsMw1.CacheSize = 5 rsMw1.Open mysqlMw1,oConnMw1 rsMw1.PageSize = 5
....
No matter what I do, i get about 2500 records output. I saw something about ado 2.5 not supporting pagesize. Is that true, I upgrated to net, but it still shows ado 2.5.
Any help appreciated.
|
|
jdb32
Starting Member
35 Posts |
Posted - March 01 2007 : 07:24:37
|
The PageSize property has nothing to do with what is displayed. Its is only the maximum number of records that are on a logical page within a recordset. This page is not a pyhsical page but rather a memory allocation. When you open a recordset it always brings back all the records created and stores them in whats called a cursor, a memory representative table. When using PageSize, the data is stored into logical pages. You would normally use PageSize when you want to add paging to your database. Take a look at: http://www.pbdr.com/vbtips/db/adopages.htm
Important thing to note, whenever you open a recordset, ALL records will be returned. |
|
|
apswater
VP-CART Super User
444 Posts |
Posted - March 02 2007 : 01:07:57
|
Thanks,
You would think w3 would explain tnat part....
on a another note,
My brother got a new computer today with Vista abd for some reason he cant see my pages, but can see others. He could tracert the site and he does show up on an asp log file but then just gets a blank page.
Does anyone know if vista has issues with java or vp-asp? I did just put in google-analytics, I wonder if thats the isuue
if you have vista can you hit http://www.apswater.com and let me know that you can see it and the speed?
Thanks in advance. |
|
|
|
Topic |
|