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 repeat a string to a specific number of times in php?
How to redirect a page in php?
What are the advantages of php?
What is difference between mysqli and mysql?
When to use inquire vs enquire?
Can I include php in javascript?
What is nan value?
Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
How we load all classes that placed in different directory in one php file , means how to do auto load classes.
What is difference between web service and api?
Differences between get and post methods?
What is the difference between explode() and split() functions?
How is a constant defined in a PHP script?
What is csrf token and how it works?
Does empty check for null?