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 session? How to set a value in session? How to remove data from a session?
What are the features of php 7?
Can we run php on tomcat server?
What is framework in php?
Write a program to display a table of any given number?
What is form action php?
Explain the difference between session and cookies in php?
How arrays are used in php?
How we get ip address of client, previous reference page etc?
What is php artisan serve?
Explain the difference between isset() and empty()?
What is the best php version for wordpress?
What is php and its uses?
Explain what is smarty?
How do I sort numbers in php?