connect to ms access database using php pdo odbc code example

Example: microft access request database with pdo

<?php
// Location to file
$db = 'F:\localhost\htdocs\msaccess\trinitytuts.accdb';
if(!file_exists($db)){
	die('Error finding access database');
}
// Connection to ms access
$conn = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=".$db.";Uid=; Pwd=;");

Tags:

Php Example