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

Why does php start with variables?

547


Tell me how can we check the value of a given variable is alphanumeric?

496


Tell me what does $_env means?

529


How does php server work?

534


What is variable function php?

549






How to create a mysql connection in php?

523


What is traits? How it is used in php?

548


What is the best php framework 2018?

531


Tell me what is the actually used php version?

565


What are the functions to be used to get the image's properties (size, width and height)?

545


What is file upload?

579


What is Apache's configuration file typically called?

557


What does addslashes do in php?

537


What function should you use to join array elements with a glue string?

548


Differentiate between require and include?

539