Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I try to connect 'dbname' database using php.
my current code is below.
$conn = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq='C:\xampp\htdocs\test\dbname.accdb'", '', '');
if (!$conn)
{
exit("Connection Failed: " . $conn);
}
?>

when i trying to connect at that time following error show.

Warning: odbc_connect() [function.odbc-connect]:
SQL error: [Microsoft][ODBC Microsoft Access Driver] Not a valid file name., SQL state S1000 in SQLConnect in C:\xampp\htdocs\test\odbc.php on line 3
Connection Failed:

please tell me how to solved this problem??
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900