R: [PHP-WIN] Using Access with PHP via ODBC

From: Date: Thu, 18 Apr 2002 10:20:50 +0000
Subject: R: [PHP-WIN] Using Access with PHP via ODBC
Groups: php.windows 
Request: Send a blank email to php-windows+get-13155@lists.php.net to get a copy of this message
Try this (from pscode.com): <? $conn = new COM("ADODB.Connection") or die("Cannot start ADO"); // Microsoft Access connection string. $conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\\inetpub\\wwwroot\\php\\mydb.mdb"); // SQL statement to build recordset. $rs = $conn->Execute("SELECT myfield FROM mytable"); echo "<p>Below is a list of values in the MYDB.MDB database, MYABLE table, MYFIELD field.</p>"; // Display all the values in the records // et while (!$rs->EOF) { $fv = $rs->Fields("myfield"); echo "Value: ".$fv->value."<br>\n"; $rs->MoveNext(); } $rs->Close(); ?> -----Messaggio originale----- Da: Brian McGarvie [mailto:bmcgarvie@lennox-mckinlay.co.uk] Inviato: giovedì 18 aprile 2002 12.06 A: php-windows@lists.php.net Oggetto: [PHP-WIN] Using Access with PHP via ODBC Hi, I'm developing an application which is built on top of an existing MS Access Database, when the DB is not opened/windows client to the DB is opened it creates a lock, which in turn prevents PHP from accessing the Database, is there any solutions to this? Thanks in advance.... -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#13155) next »