JoeAtRevolutionUnltd
Programmer
I am trying to connect to an ms access database on apache and keep getting this error: Failed to fetch error message.
Here is my code:
Can anyone help me out?
Here is my code:
Code:
$conn = odbc_connect("roster","","");
if (!conn)
{exit("Connection Failed: " .$conn);}
else
{
$sql = "SELECT id, state, county FROM roster";
$result = odbc_exec($conn, $sql) or die (odbc_errormsg());
if (!result)
{exit("Error in SQL");}
else
{odbc_result_all($result);}
}
odbc_close($conn);
Can anyone help me out?