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
What is http php?
Can we run php in apache tomcat?
What is the difference between $var and $$var?
How to set session.gc_divisor properly?
What is array filter in php?
What are the different opening and closing tags available in PHP?
What is class extend in php?
What is an example of a variable?
What is the difference between indexed and associative array?
Write a php function to convert all null values to blank?
Is age interval or ordinal data?
What is the difference between apache and tomcat?
What is the function file_get_contents() useful for?
What is the differences between $a != $B and $a !== $B?
How to calculate the difference between two dates using php?