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
How to get complete current page url in php?
How variables are passed through arguments?
What is echo and print in php?
Applications written to provide a GUI shell for Unix and Linux are called
Can php replace javascript?
What is PECL?
What is htaccess? Why do we use this and where?
How do I find environment variables?
How do I expire a php session after 30 minutes?
Why use static methods php?
What is polymorphism in oop php?
Where do I run php code?
What is the difference between explode and split?
Why json is used in php?
How to assigning a new character in a string using php?