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
Why does php start with variables?
Tell me how can we check the value of a given variable is alphanumeric?
Tell me what does $_env means?
How does php server work?
What is variable function php?
How to create a mysql connection in php?
What is traits? How it is used in php?
What is the best php framework 2018?
Tell me what is the actually used php version?
What are the functions to be used to get the image's properties (size, width and height)?
What is file upload?
What is Apache's configuration file typically called?
What does addslashes do in php?
What function should you use to join array elements with a glue string?
Differentiate between require and include?