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
Is c similar to php?
Is array function in php?
When sessions ends?
Explain what does $_files means?
Why laravel is the best php framework in 2019?
What is the output of the following php code?
What is strstr php?
What is die in php?
How to include variables in double-quoted strings in php?
How do you define a constant in php?
What is input sanitization in php?
What is the difference between myisam and innodb?
Explain the purpose of output buffering in php.
What does empty mean in php?
what is constructor