ID: 38310 Updated by: [EMAIL PROTECTED] Reported By: suneelpro at rediffmail dot com -Status: Open +Status: Feedback Bug Type: ODBC related Operating System: windows PHP Version: 5.1.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi And use the PDO ODBC instead, it has been reported to work much better. Previous Comments: ------------------------------------------------------------------------ [2006-08-03 10:05:16] suneelpro at rediffmail dot com Description: ------------ pls provide source code for connection to access and display the desired information (selecting of fields )in php. Reproduce code: --------------- function getListofPersonalDet() {$connect = odbc_connect("msaccess","root","root") or die("Couldn't connect to datasource."); echo $query = "select * from personal_details"; $result = odbc_prepare($connect,$query); odbc_execute($result); odbc_result_all($result,"border=1"); odbc_free_result($result); while (odbc_fetch_row($result)) { for ($y = 1; $y <= odbc_num_fields($result); $y++) { $arr[$x][$y] = odbc_result($result,$y); $x++; } if ($x > 1) return $arr; } $arr=$result; echo $arr[1][1]; } Expected result: ---------------- array list of information framed in html using php Actual result: -------------- Warning: odbc_fetch_row(): 8 is not a valid ODBC result resource ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38310&edit=1
