oh thanks, i changed it to a system dsn now...
but i get this error msg
Warning: odbc_connect() [function.odbc-connect]: SQL error: Failed to fetch error message, SQL state HY000 in SQLConnect in C:\xampp\htdocs\xampp\display.php on line 5
Connection Failed:
program being this
<html>
<body>
<?php
$conn=odbc_connect('data','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM clients_online";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table><tr>";
echo "<th>ip</th>";
echo "<th>mac</th></tr>";
while (odbc_fetch_row($rs))
{
$compname=odbc_result($rs,"ip");
$conname=odbc_result($rs,"mac");
echo "<tr><td>$compname</td>";
echo "<td>$conname</td></tr>";
}
odbc_close($conn);
echo "</table>";
?>
</body>
</html>
Originally Posted by
scru
Are you sure it is a system dsn and not a user dsn? You must you the system tab in ODBC in the Administrative Tools to set up a system dsn.
HTH
Last edited by peter_budo : Apr 26th, 2008 at 8:20 am. Reason: Keep It Organized - please use [code] tags