odbc connection with ms access over LAN
Posted: Fri Jun 24, 2005 11:50 am
Hello
for last couple of hours I'm trying to access MsAccess db - which is on win xp pc - from GNU/Linux machine (they are in LAN). The code works on winXp machine, but I don't know what to do to access from another machine. The page with script just doesn't load.
(Linux machine is running PHP 4.3)
That's the code, it's from php documentation.
please, help....
yours
Korb
d11wtq | Please use
for last couple of hours I'm trying to access MsAccess db - which is on win xp pc - from GNU/Linux machine (they are in LAN). The code works on winXp machine, but I don't know what to do to access from another machine. The page with script just doesn't load.
(Linux machine is running PHP 4.3)
That's the code, it's from php documentation.
Code: Select all
<?php
$con = odbc_connect('ip/dns_name','msAccessDbUser','msAccessDbPass');
if ($con)
{
echo "odbc connected<br>";
$sql = "select * from Menu";
$exc = odbc_exec($con,$sql);
}
else
echo "odbc not connected<br>";
if($exc)
{
echo "selection completed<br>";
while($row = odbc_fetch_object($exc) )
echo $row->Level."<br>";
}
else
echo "selection failed<br>";
?>yours
Korb
d11wtq | Please use
Code: Select all
tags when posting PHP code[/color]