I find it too funny that I have a similar error and came here looking for an answer. I'll post behind you and maybe we get get [solved] together .
I'm trying to ODBC connect to providex database using ODBC. Now I got it to work on my developer server, using IIS 5 and XP Professional 2002. So the code works. I've seen it work.
But when I put it on the Main server running Windows Server with IIS 6 I get this crapped out Error.
Error in SQLPHP Warning: odbc_exec() [function.odbc-exec]: SQL error: [ProvideX][ODBC Driver][FILEIO]Table is not accessible, SQL state S0000 in SQLExecDirect in c:\Inetpub\wwwroot\ItemView2.php on line 58
Can anyone help me out? I'm fresh out of Ideas.
Here is the source code jik you need to see it.
$sql="SELECT IM2_InventoryItemWhseDetl.QtyOnHand, IM2_InventoryItemWhseDetl.WhseCode FROM IM2_InventoryItemWhseDetl WHERE (((IM2_InventoryItemWhseDetl.ItemNumber)='$prtnum'))";
$rs=odbc_exec($conn,$sql);
if (!$rs) {
exit("Error in SQL");
}
while (odbc_fetch_row($rs))
{
$Loc=odbc_result($rs, "WhseCode");
$Qty=odbc_result($rs, "QtyOnHand");
echo "<tr><td>$Loc</td><td>";
if ($Qty < 1) { echo"<td class='small' align='left'>OUT<IMG SRC='sRed.gif' ALT='On Back Order' border='0' height='18' width='18'></td>";}
else { echo"<td class='small' align='left'>IN<IMG SRC='sGreen.gif' ALT='In Stock' border='0' height='18' width='18'></td>";}
echo"</tr>";
}
odbc_close($conn);
$i++;
}
r/s
Learning Fast