I caot find the solution to this error, I'm hoping anyone can guide me in the right direction or tell me if my syntax is wrong.
$co = '"odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};' .
'Dbq=C:UsersDavidDocumentsSCHOOLNEWAssignment5-PROG1800databaseas4.mdb;';
$dbHandle = new PDO($co);
$dbHandle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "
INSERT INTO `as4`.`part` (`partID`, `vendorNo`, `description`, `onHand`,
`onOrder`, 'cost`, `listPrice`) VALUES (NULL, '$vendorNo',
'$desc', '$onHand', '$onOrder', '$cost', '$listPrice');";
$statementHandle = $dbHandle->prepare($sql);
I receive the error:
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:UsersDavidDocumentsSCHOOLNEWAssignment5-PROG1800phpsuccessfulPart.php:110 Stack trace: #0 C:UsersDavidDocumentsSCHOOLNEWAssignment5-PROG1800phpsuccessfulPart.php(110):
PDO->__construct('"odbc:Driver={M...') #1 {main} thrown in C:UsersDavidDocumentsSCHOOLNEWAssignment5-PROG1800phpsuccessfulPart.php on line 110
I'm ruing apache using xampp.I believe I have the correct drivers installed, hopefully someone can tell me if I need to download a certain file. Thanks for your time.
