Gaston_Phone
31/08/2016, 13h24
L'erreur n'était pas là où je le pensais mais l'important c'est que finalement cela fonctionne
$dbName = "Data.accdb"; if(!file_exists($dbName)) { die("Could not find database file.
".$dbName); } try { $db = new PDO("odbc:DRIVER=MDBTools; DBQ=$dbName"); } catch(PDOException $e) { echo "Error: ".$e->getMessage()."
"; }
apt-get install unixodbc unixodbc-dev php5-odbc mdbtools odbc-mdbtools
$dbName = "Data.accdb"; if(!file_exists($dbName)) { die("Could not find database file.
".$dbName); } try { $db = new PDO("odbc:Driver=MDBTools;Dbq=$dbName"); } catch(PDOException $e) { echo "Error: ".$e->getMessage()."
"; }
Error: SQLSTATE[08001] SQLDriverConnect: 1 [unixODBC]Could not find DSN nor DBQ in connect string