homer.favenir Posted September 8, 2007 Share Posted September 8, 2007 ive already set the odbc in control panel for ms access driver but there is still an error: Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\wamp\www\first project\msaccess_conn.php on line 10 Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in C:\wamp\www\first project\msaccess_conn.php on line 17 Error in SQL My code in php are: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $conn=odbc_connect ('yhentry.mdb','',''); if ($conn) { exit ("Connection Failed" . $conn); } $sql="Select * from YH Entry"; $rs=odbc_exec($conn,$sql); if (!$rs) { exit ("Error in SQL"); } echo "<table><tr>"; echo "<th>Directory Name</th>"; echo "<th>Filename</th>"; while (odbc_fetch_row($rs)) { $directory=odbc_result($rs,"Directory"); $filename=odbc_result ($rs,"Filename"); echo "<tr><td>$directory</td>"; echo "<td>$filename</td></tr>"; } odbc_close ($conn); echo "</table>"; ?> </body> </html> can anyone pls tell me the problem and solutions. thanks ??? Link to comment https://forums.phpfreaks.com/topic/68527-how-can-i-connect-to-ms-access-using-php-pls-help-tnx/ Share on other sites More sharing options...
homer.favenir Posted September 9, 2007 Author Share Posted September 9, 2007 bumping this post. ??? Link to comment https://forums.phpfreaks.com/topic/68527-how-can-i-connect-to-ms-access-using-php-pls-help-tnx/#findComment-344496 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.