You are here: Re: Output differs between browser and console « PHP Programming Language « IT news, forums, messages
Re: Output differs between browser and console

Posted by Richard on 07/06/07 13:29

<google@thefifthimperium.com> wrote in message
news:1183669986.293136.258410@57g2000hsv.googlegroups.com...
> On Jul 5, 4:00 pm, "Richard" <root@localhost> wrote:
>> Do you get any error messages?
>> Can you trim your script down to only the failing part?
>
> As stated in the original, I'm getting what appears to be a general
> 'can't find tables' error:
>
> PHP Warning: odbc_exec(): SQL error: [SmartWare Software][SmartWare
> ODBC Driver][ISAM]Table access error, SQL state S0000 in SQLExecDirect
> in D:\path\CustView\sw265test.php on line 52
> PHP Warning: odbc_fetch_row(): supplied argument is not a valid ODBC
> result resource in D:\path\sw265test.php on line 57
>
> The ODBC driver is for an ANGOSS Smartware database, SWODBC32.DLL
> V4.60.00.2127
>
> The script code is pretty simple:
>
> 44 $conn = odbc_connect($dbhost, $dbuser, $dbpw);
> 45 $result = odbc_tables($conn);
> 46 odbc_result_all( $result );
>
> //This returns No Results, but no error, either
> // commented out lines here
>
> 51 $sql = "SELECT * FROM $dbname";
> 52 $result2 = odbc_exec( $conn, $sql );
>
> // commented out lines here
>
> 57 while (odbc_fetch_row($result2)) {
> echo odbc_result_all( $result2 );
> }
>
>
> -JPB

Hi JPB,
I read the "Table access error" as: there is something wrong with accessing
the table you specify, not necesarily that the table doesnt exist... could
also be a permissions problem, or a lot of other things.

As stated by someone else in this thread:
On line 51 it says dbname, but this is of course tablename I hope?

Does the webserver have permission to access the database? Do you need to
specify the allowed hosts anywhere (as in MySQL)? Maybe the hostname is
reported differently when running from the IIS. Or not at all.
Can you turn on error logging for the ODBC so you can see whats going on?
What does ANGOSS docs say about this specific error?

Good luck,
Richard.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация