ID: 29669 Updated by: [EMAIL PROTECTED] Reported By: www dot spam at whoah dot net -Status: Open +Status: Feedback Bug Type: COM related Operating System: Windows 2000 Professional PHP Version: 5.0.1 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2004-08-14 04:13:53] www dot spam at whoah dot net Further: The delay seems to be related to the size of the results data being returned. The table referenced by my query has some 11000 records whereas the same query on another table with only a few records experiences no delay. Querying the same table (11000 records) using a server-side cursor causes no delay. ASP experiences no such delay using the same COM objects and routines, on the same server. ------------------------------------------------------------------------ [2004-08-14 03:29:38] www dot spam at whoah dot net 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29669&edit=1