PDA

View Full Version : PHP & ODBC/Access Connection



Neolumi
August 22nd, 2007, 10:25 AM
Hi, I'm attempting to connect to an access database using PHP without DSN, and I'm not having much luck. I need to be able to insert data into the access DB,

I've tried this with the alli.mdb file in the same directory as the script:

$dbq = 'alli.mdb';
$db_connection = odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbq", "", "") or die("asdsasa");

$result = odbc_tables($db_connection);


while (odbc_fetch_row($result)){
if(odbc_result($result,"TABLE_TYPE")=="TABLE")
echo"<br>".odbc_result($result,"TABLE_NAME");

}

If anyone could help with this thatd be great :)