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
What are sql functions?
How can we check the value of a given variable is a number?
What does the unset() function mean?
What are the ways to include file in php?
How does api connect to database?
How the result set of mysql be handled in php?
How to get elements in reverse order of an array in php?
Which function can be used to exit from the script after displaying the error message?
Explain some of the php array functions?
Explain php explode() function.
Which is useful for method overloading?
What does the unset() function means?
Define urlencode() and urldecode() used in php?
What is the different between count() and sizeof() in php?
What is php dependency injection?