Re: php with MS Acces

From: Date: Sat, 11 Oct 2003 18:14:17 +0000
Subject: Re: php with MS Acces
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-21756@lists.php.net to get a copy of this message
Which line is the #13 (and #21, #25 resp.) in your code? "Masterblue" <a.b.debruin@planet.nl> schrieb im Newsbeitrag news:20031011100449.1451.qmail@pb1.pair.com... > I tried the code below but i got an error , > Im on a win2000 machine and I use php 4.3.3 > Could someone help me out please!!! > > ----- Code ----- > $db = '\\\\server\\resource\\db.mdb'; > $conn = new COM('ADODB.Connection'); > $conn->Open("DRIVER={Driver do Microsoft Access (*.mdb)}; DBQ=$db"); > > // Driver do Microsoft Access (*.mdb) > // must be the name in your odbc drivers, the one you get > // from the Data Sources (ODBC). > // In this case, I'm in Mexico but the driver name is in portuguese, thanks Microsoft. > > $sql = 'SELECT username FROM tblUsuarios'; > $res = $conn->Execute($sql); > while (!$res->EOF) > { > print $res->Fields['username']->Value . "<br>"; > $res->MoveNext(); > } > > $res->Close(); > $conn->Close(); > $res = null; > $conn = null; > ----- End Code ----- > > ---The error --- > > Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft > OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft > Access Driver]General error Unable to open registry key 'Temporary > (volatile) Jet DSN for process 0x5d8 Thread 0x1c4 DBC 0xae82f4 Jet'. in > E:\database.php on line 13 > > Warning: (null)(): Invoke() failed: Exception occurred. Source: > ADODB.Connection Description: Operation is not allowed when the object is > closed. in E:\database.php on line 21 > > > Fatal error: Call to a member function on a non-object in E:\database.php on > line 25 > > ---End of The error --- > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#21756) next »