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 create a table using php?
How can we encrypt the password using php?
How do you check is php not empty?
Write syntax to open a file in php?
What is difference between isset and empty in php?
Do you know what's the difference between __sleep and __wakeup?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
What is the main difference between require() and include()?
Is json a string php?
Explain Type hinting in PHP?
How can i execute PHP File using Command Line?
What is the difference between client-side and server-side programming?
Describe which programming language does php parallel to?
Explain mail function in PHP with syntax?
How to declare an array in php?