|
The sql statement works fine on the first server and the second server has the same tables, Im using the example Northwind database as a basic test and the sql select * from customers works fine when I use Query Analyser on the new server.
My thinking is there is a permissions problem within php as i can access the database via any other method.
<?php
odbc_close_all;
$odbc_dsn = "test";
$odbc_userid = "";
$odbc_password = "";
$query = "select * from customers";
if(!($odbc_db = odbc_connect("test","","")))
die("could not connect to ODBC Data Source $odbc_dsn");
if(!($odbc_rs = odbc_do($odbc_db, $query)))
die("Error executing $query");
while ($result = odbc_result_all($odbc_rs))
{odbc_result ( $odbc_rs, 1 );
?>
<TABLE border=1 width=925>
<TR>
<TD width =100><font size="2" face="tahoma, Berlin Sans FB Demi"><SMALL><? echo $odbc_rs; ?></font></TD>
</TR>
</TABLE>
<?}
Last edited by dassa : 09-28-2004 at 10:24 AM.
|