Is it possible to connect to a Microsoft Access database
without a DSN? If so, how??

Answer Posted / binu. v. pillai

Yes, we can
<?php

//Connect access database

$con=odbc_connect("DRIVER={Microsoft Access Driver
(*.mdb)}; DBQ=" . str_replace("/", "\\", $_SERVER
["DOCUMENT_ROOT"]) . "\foldername\dbname.mdb", "db_username"
, "db_password")or die("could'nt connect database");

if (!$con) {
die('Could not connect: ' . odbc_error());
}

?>

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get complete current page url in php?

552


How variables are passed through arguments?

551


What is echo and print in php?

493


Applications written to provide a GUI shell for Unix and Linux are called

569


Can php replace javascript?

529






What is PECL?

773


What is htaccess? Why do we use this and where?

488


How do I find environment variables?

500


How do I expire a php session after 30 minutes?

529


Why use static methods php?

531


What is polymorphism in oop php?

502


Where do I run php code?

514


What is the difference between explode and split?

485


Why json is used in php?

533


How to assigning a new character in a string using php?

537