|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-14 04:13 UTC] www dot spam at whoah dot net
[2005-02-15 00:25 UTC] tony2001@php.net
[2005-02-23 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
Description: ------------ When attempting to use ADODB.RecordSet COM object to query an MS Access database via a DSNless connection, setting the CursorLocation to adUseClient causes a significant delay on the processing of a query execution. ASP has no such issue with this, so maybe PHP's support can be improved (client-side cursor location allows the use of additional RecordSet features such as ->Sort() and ->Filter(), handy for porting ASP code that uses it instead of writing a dynamic query). Any database and query should reproduce this, so please modify the 'reproduce code' appropriately (to point to your own database and use your own query). Reproduce code: --------------- define("adLockReadOnly",1); define("adOpenStatic",3); define("adUseClient",3); function simpleRS($conn,$q) { $rs = new COM('ADODB.RecordSet'); $rs->ActiveConnection = $conn; $rs->LockType = adLockReadOnly; $rs->CursorLocation = adUseClient; //comment this line to remove the delay $rs->CursorType = adOpenStatic; $rs->Source = $q; echo 'opening... '; $rs->Open(); echo 'done'; return $rs; } $dbconn = new COM('ADODB.Connection'); $dbconn->open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='. realpath('../../data/phpbb2.mdb')); $rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users'); $dbconn->close(); Expected result: ---------------- opening... *almost instant* done Actual result: -------------- opening... *delay* done