Subject php odbc error
Author googlepost123
Hi,

I am using the Employee.fdb sample that comes with Firebird 1.5.1.
Everything resides on a WinXP Pro pc. I set up an ODBC connection
called "FB Employee Sample" and tested it with MS Access and Brio;
works OKAY. When I try to run the following script:

***************************
<html>
<body>

<?php
$conn=odbc_connect('FB Employee Sample','SYSDBA','masterkey');
if (!$conn)
{
exit("Connection Failed: " . $conn);
}
$sql="SELECT * FROM EMPLOYEES";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{
exit("Error in SQL");
}
echo "<table><tr>";
echo "<th>Employee Name</th>";
echo "<th>Employee ID</th></tr>";
while (odbc_fetch_row($rs))
{
$empname=odbc_result($rs,"Full Name");
$empid=odbc_result($rs,"ContactName");
echo "<tr><td>$empname</td>";
echo "<td>$empid</td></tr>";
}
odbc_close($conn);
echo "</table>";
?>

</body>
</html>
***************************

this is what I get in the browser window: "Warning: odbc_connect()
[function.odbc-connect]: SQL error: unavailable database, SQL state
08004 in SQLConnect in C:\Inetpub\test\odbc-test2.php on line 5
Connection Failed::. Can someone please tell why this is not working
in PHP?

TIA