Is it possible to connect to a Microsoft Access database
without a DSN? If so, how??
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ramachandra dixith
ya its working niceley in my local system
still i have to check in server...
any way code is connecting database.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ghan shyam
yes it is posible to connect ms access database without dsn
you have to provide Driver for database and database path in odbc_connect function. like :
odbc_connect(DRIVER={Microsoft Access Driver
(*.mdb)}; DBQ="{database path}", "{db username if any}"
, "{db_password if any}") or die("could not connect to database");
Is This Answer Correct ? | 0 Yes | 0 No |
Can we use session in mvc?
how to open & closing opening period in fico
How can I reverse sort an array keeping the correlation between the index and value?
2 Answers Rushmore Consultancy,
How to read a file in binary mode?
Why do we use csrf token?
What is uri routing?
full form of php??
Which function will suitably replace 'x' if the size of a file needs to be checked? $Size=x(filename);
Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?
what is session_set_save_handler in PHP?
Is strcmp case sensitive?
hello all, I need some sample placement papers in lion bridge.. can anyone help me?