I have to use an ADODB.Connection to an Access database, which I'm very unfamiliar using. Everything is going well in my app except when I query a field that is NULL. Then I get the error mentioned in the subjest. As the NULL field is printed into a form it's usually says "Object id# X" where X is a number.
I've tried checking to see if the entry ="" and a couple of other options, but haven't had any sucess. The error is on the $notes data:
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\\PCRecruiterDB\\Excelact.mdb");
$sql = "SELECT * FROM Candidates WHERE Candidate_Id = '$_POST[contact_pk]'";
$rs = $conn->Execute($sql);
$firstName= $rs->Fields("firstName");
$lastName= $rs->Fields("lastName");
$notes = $rs->Fields("notes");
I've tried:
if($rs->Fields("notes"))==""){ ...; }
but that causes the error as well --of course.
Any thoughts would be appreciated!
Oz