PHP 4.0.1.pl2, IIS 5.0, ODBC, HELP!!!!!!

From: Date: Fri, 22 Dec 2000 17:16:27 +0000
Subject: PHP 4.0.1.pl2, IIS 5.0, ODBC, HELP!!!!!!
Groups: php.db 
Request: Send a blank email to php-db+get-5419@lists.php.net to get a copy of this message
Hello, I have an NT 2000 Box with IIS5.0, MSSQL 7.0 and PHP 4.0.1.pl2 installed. I have created an application in Access application that I use to create a dynamic web site. I do an export from Access to an ODBC source which points to the MSSQL server on the NT 2000 Box. The export works fine and I can see the tables on the NT 2000 Box. Here is where the trouble begins..... If I try to read the tables with PHP, I can not read tables that have TEXT fields in them, it causes the server to crash with this message. HTTP/1.1 500 Server Error Server: Microsoft-IIS/5.0 Date: Fri, 22 Dec 2000 16:53:49 GMT Connection: close Content-Type: text/html Content-Length: 93 The remote procedure call failed. TEXT field were are defined as MEMO fields in ACCESS, but are converted to TEXT when exported. All other field types seem to be working without any problems. I can issue SQL command from the NT 2000 command prompt to the SQL server and display the tables just fine and verify that the data exists. I can read tables fine if they do NOT have a TEXT field defined in them. Can someone help me figure out how to read tables that have TEXT fields with PHP. Here is the code I am using to read the table: <?php $HostName = "host"; $UserName = "user"; $PassWord = "password"; $db = odbc_pconnect($HostName,$UserName,$PassWord); $query = "select * from Services"; $result = odbc_do($db, $query); echo "<b>Services</b><table border=1><tr><th>ID</th><th>Description</th></tr>\n"; $nbrow=0; while(odbc_fetch_row($result)) { $nbrow++; $ID = odbc_result( $result, 1 ); $Desc = odbc_result( $result, 2 ); echo "<tr><td>$ID</td><td>$Desc</td></tr>\n"; } echo "<tr><td colspan=2>$nbrow entries </td></tr></table><p>" odbc_close_all(); ?> Thank You Robert Thaller 707-259-1233 ext: 313 rthaller@net-flow.com

« previous php.db (#5419) next »