Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Do you know how to get the ip address of the client?

1069


Why does sql injection happen?

949


How can you increase the maximum execution time of a script in php?

909


What are the uses of explode() and implode() functions?

1028


How to redirect https to http url and vice versa in .htaccess?

937


Can a trait extend a class php?

933


Is it more secure to use cookies to transfer session ids?

918


What is basename php?

926


Is it worth learning php in 2019?

915


What is the difference between static and dynamic websites?

933


What is nan value?

880


What is $_ get and $_ post in php?

1014


Explain mixed and callback functions?

1049


What are the differences between mysqli_connect and mysqli_pconnect?

961


How do I escape data before storing it into the database?

927