MS Access connection issues

A

Anonymous

Guest
Hey Guys,

Not posted for a while, but have come across an issue that I need your help on ;)

I'm trying to link an MS Database with a website, I can't use MySQL for reasons I cba to explain, I have this code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
</html>
<?php

$user = "";
$password = "";
$DBLocation = "C:\Users\ben\Documents\Inspections.mdb";

// Microsoft Access
$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=" . $DBLocation . "", $user, $password);
"SELECT * FROM 'Inspectiontypes'";
"echo= 'Agency'";


?>

<body>
</body>
</html>

No errors come up when I run the script, so that's all good, but it isn't displaying the data I want it to, i.e. the list of agencies in the table "Inspectiontypes". All I get is a blank screen

Any ideas?

Cheers
Ben
 
Add appropriate error validation/trapping to see what is going wrong.
 
Back
Top