Sincerely since I do not touch php. Now at the University we will work with Arduino boards and we want to make a mini server with a web page hosted on it.
Well, as things are going to be simple, I have decided to use Access ... I've been doing some tests at home with notepad ++ and XAMPP , but when trying to connect to my database In access, I receive the following message:
Ok, the message is clear ... can not find the driver. I read in forums that what should be done is to enable the php_pdo_obdc.php extension in the php.ini file, which can be accessed easily by clicking on config, in the control of XXAMP. Well, the issue is that I added it, but it still does not work ... I do not know if I'm writing it in a bad place in the file or I just need to do something else.
How can I install the driver?
try{
$bd = new PDO("odbc:DRIVER={Microsoft Access Driver (*.accdb)}; DBQ=$direccion; Pwd=contra;");
}catch(PDOException $e){
echo $e->getMessage();
}
PHPInfo information
UPDATE
You have learned another thing now:
SQLSTATE [IM002] SQLDriverConnect: 0 [Microsoft] [ODBC Driver Manager] The name of the data source is not found and no default driver was specified
<?php
try{
$dbName = "webData.accdb";
$bd = new PDO("odbc:DRIVER={Microsoft Access Driver (*.accdb)}; DBQ=".realpath($dbName)."; Pwd=arduiccess;");
}catch(PDOException $e){
echo $e->getMessage();
}
?>
I can not use those DBs with extensions .mdb , as you can notice.