someguy321 Posted November 4, 2010 Share Posted November 4, 2010 I'm able to use PHP-ODBC to read the tables in an MDB file, as well as the column names on the tables. But when I try to read data from a particular table, it fails (I don't get an error, instead the browser pops up a message asking if I want to save the file "mdbtest.php" which is 0 bytes in size)! Any idea what's wrong? //THIS WORKS $conn = odbc_connect( 'TestDB', '', '' ); if ( !$conn) exit("Connection Failed: " . $conn); //STILL FINE HERE $sql = 'SELECT * FROM Customers'; //INCLUDING THIS LINE OF CODE CAUSES THE PROBLEM $rs = odbc_exec( $conn, $sql ); Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted November 4, 2010 Share Posted November 4, 2010 I'm not familiar with ODBC, but is this perhaps backwards? $rs = odbc_exec( $conn, $sql ); should be... ? $rs = odbc_exec( $sql, $conn ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.