1

My system OS is 64-bit. Ms Access 2007 is 32 bit. I have connect with PHP. PHP file give following error:

"Warning: 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\PI\Connection.php on line 3"

Connection.php

<?php

$con = odbc_connect("Driver={Microsoft Access Driver (*.mdb,*.accdb)};Dbq=PIInstitute","","");

if($con){
    echo "Connected";

}else{

    echo "Failed";
}
?>
bcesars
  • 1,016
  • 1
  • 17
  • 36
raj
  • 83
  • 1
  • 6
  • 14
  • Maybe this post can help https://stackoverflow.com/questions/2222684/connecting-to-ms-access-2007-using-odbc-connect-error-in-driver – connormcwood Jan 19 '18 at 18:59
  • its give error could not find driver – raj Jan 19 '18 at 19:09
  • Access bitness doesn't matter. PHP bitness dictates ODBC driver bitness. Usually best to `odbc_connect("DSN=dsn-name","uid","pwd")` with known-working DSN. – TallTed Jan 19 '18 at 21:05
  • this is give above error – raj Jan 20 '18 at 04:32
  • I'm voting to close this question as off-topic because it's a duplicate of: https://stackoverflow.com/questions/48339856/warning-odbc-connect-sql-error-microsoftodbc-driver-manager-data-source – Gustav Jan 20 '18 at 08:31
  • yes,but i have need perfect answer and solve my problem. – raj Jan 20 '18 at 08:49

0 Answers0