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 are sql functions?

731


How can we check the value of a given variable is a number?

844


What does the unset() function mean?

832


What are the ways to include file in php?

747


How does api connect to database?

782


How the result set of mysql be handled in php?

818


How to get elements in reverse order of an array in php?

782


Which function can be used to exit from the script after displaying the error message?

742


Explain some of the php array functions?

838


Explain php explode() function.

787


Which is useful for method overloading?

880


What does the unset() function means?

834


Define urlencode() and urldecode() used in php?

836


What is the different between count() and sizeof() in php?

738


What is php dependency injection?

715