Does anyone know how I can connect to a .MDB in PHP??? does anyone have a code??
Printable View
Does anyone know how I can connect to a .MDB in PHP??? does anyone have a code??
Yeah but wqe have a problem.....
Fatal error: Call to undefined function: db2_connect() in /home/rlnz/public_html/admin/zz.php on line 6Code:<?php
$database = 'db1.mdb';
$user = '';
$password = '';
$conn = db2_connect($database, $user, $password);
if ($conn) {
echo "Connection succeeded.";
db2_close($conn);
}
else {
echo "Connection failed.";
}
?>
Isn't this a Visual Basic Forum or am I lost :eek:
I would set up an ODBC driver for the Access database and use the built in ODBC functions.
Moved to PHP forum
ODBC is your best option, because it manages concurrent access to the file. This is something that Access is not good at at the best of times.
My advice is, DON'T use Access. :)