@NogDogJun 30.2010 — #From the DB side, the only thing I know of is the TOP command in MS Access, which is more or less the same as LIMIT, but it does not appear to have a corollary to OFFSET. Other than porting it over to a "real" DBMS ( ? ), all I can think of is to query all, perhaps using TOP to stop it after it would get all that page's records (essentially the TOP value would be LIMIT [i]plus[/i] OFFSET), then if the PHP DB extension you're using has some sort of record seek function, use that to jump to the "offset" result row, otherwise do a loop with a counter on the results, skipping each until the counter reaches the desired offset (which seems pretty ugly if you will be dealing with lots of matching rows in the DB query).
@sohguanhJul 01.2010 — #Many of you may be aware there microsoft access does not support LIMIT in queries.
I have msaccess database table that has around 82000 records.I need to paginate these records.
Could anyone help me to write a query that would suffice the same. [/QUOTE]
The reason why vendors are selling their enterprise databases over desktop databases is when data-set get big and performance concern creep in, their product is "touted" to offer some features over those desktop database.
In your case, you seem to have hit one of them with M$ Access. You can only do what NogDog suggested but basically I think it will still have performance problem.
@palansanthuauthorJul 01.2010 — #The scenario is like , I would be receiving msaccess database every month and i will have to setup a automated php script that would read data from this access database and push the data into our "real" dbms ? thats MySQL
For this I am using windows machine and php odbc driver.
Due to large size of the database ..php throws following error :
"Allowed memory size of 134217728 bytes exhausted (tried to allocate 133169139 bytes"
I know that we can increase allowed memory size using "ini_set" but the msaccess database size will keeps increasing every month. So i am planning to read few records and in a loop and keep pushing them to mysql.
P.S. : Our partner is not ready to give the database in any other format.Not even in CSV.
@NogDogJul 01.2010 — #To copy from Access to MySQL, would something like this work, do you think? (I don't have Access to try it.) <i> </i>SELECT TOP 100 * FROM table;
Process those 100 records into the MySQL DB, then: <i> </i>DELETE TOP 100 FROM table;
Reiterate until all Access records have been processed in groups of 100 (or whatever increment you prefer).