Hi everybody,
I'm tring to create a connection with MS Access database through ADO connection.
If the database is on local machine, the connection is ok.
I cannot create a connection if the db is located on a network shared folder.
This is the php source code used to connection:
$conn = new COM('ADODB.Connection') or exit('Cannot start ADO.');
$rs = new COM("ADODB.Recordset");
$conn->Open("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\NomeServer\Cartella\db.mdb;Persist Security Info=True;Jet OLEDBatabase Password=xxxx");
I've also tried to puth the complete directory path with drive letter (i.e: G:\Folder\db_name.mdb), but with any positive results.
The error is:
Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft JET Database Engine<br/><b>Description:</b> Microsoft Jet database engine cannot open the file '\Server\Folder\db.mdb'. It is already opened exclusively by another user, or you need permission to view its data. ' in C:\Programmi\Apache Group\Apache2\htdocs\web\BugsView\index.php:70 Stack trace: #0 C:\Programmi\Apache Group\Apache2\htdocs\web\BugsView\index.php(70): com->Open('PROVIDER=Micros...') #1 {main} thrown in C:\Programmi\Apache Group\Apache2\htdocs\web\BugsView\index.php on line 70
The folder have all the grant permission.
I've tried to set the parameter "Persist Security Info" to False, but the result is the same.
My machine have:
Windows Xp Professional
Apache 2.2
Php 5.5
Could someone help me?
Regards
Claudio