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
Do you know how to get the ip address of the client?
Why does sql injection happen?
How can you increase the maximum execution time of a script in php?
What are the uses of explode() and implode() functions?
How to redirect https to http url and vice versa in .htaccess?
Can a trait extend a class php?
Is it more secure to use cookies to transfer session ids?
What is basename php?
Is it worth learning php in 2019?
What is the difference between static and dynamic websites?
What is nan value?
What is $_ get and $_ post in php?
Explain mixed and callback functions?
What are the differences between mysqli_connect and mysqli_pconnect?
How do I escape data before storing it into the database?