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


Please Help Members By Posting Answers For Below Questions

What is http php?

684


Can we run php in apache tomcat?

733


What is the difference between $var and $$var?

756


How to set session.gc_divisor properly?

808


What is array filter in php?

747


What are the different opening and closing tags available in PHP?

775


What is class extend in php?

754


What is an example of a variable?

749


What is the difference between indexed and associative array?

740


Write a php function to convert all null values to blank?

1080


Is age interval or ordinal data?

734


What is the difference between apache and tomcat?

763


What is the function file_get_contents() useful for?

683


What is the differences between $a != $B and $a !== $B?

728


How to calculate the difference between two dates using php?

755