Jump to content

Recommended Posts

Posted

Dear Support

 

Plz help. I need to access .mdb databases thru php.

 

This is my code

 

 

<?php

 

 

$dbName="Ancj.mdb";

 

 

if (!file_exists($dbName)) {

 

die("Could not find database file.");

 

}

 

$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");

?>

 

 

This is the error I am getting

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[iM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified' in /a.php:13 Stack trace: #0 /a.php(13): PDO->__construct('odbc:DRIVER={Mi...') #1 {main} thrown in

 

 

 

Plz help in fixing this error.

 

Thanks in advance

 

  • Like 1
Posted

It is installed, the server is Stevie. It's showing odbc under pdo

 

This is phpinfo of server Stevie. Plz help

 

 

odbc

 

ODBC Support enabled

Active Persistent Links 0

Active Links 0

ODBC library unixODBC

ODBC_INCLUDE -I/usr/include

ODBC_LFLAGS -L/usr/lib64

ODBC_LIBS -lodbc

 

Directive Local Value Master Value

odbc.allow_persistent On On

odbc.check_persistent On On

odbc.default_cursortype Static cursor Static cursor

odbc.default_db Not yet implemented Not yet implemented

odbc.default_pw ******** ********

odbc.default_user Not yet implemented Not yet implemented

odbc.defaultbinmode return as is return as is

odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes

odbc.max_links Unlimited Unlimited

odbc.max_persistent Unlimited Unlimited

 

 

PDO

 

PDO support enabled

PDO drivers sqlite2, mysql, pgsql, odbc, sqlite

 

pdo_mysql

 

PDO Driver for MySQL enabled

Client API version 5.1.56

 

PDO_ODBC

 

PDO Driver for ODBC (unixODBC) enabled

ODBC Connection Pooling Enabled, strict matching

 

 

Posted

On server Stevie. I don't know the port.

 

Please support plz help me out here. Heliohost is the best service provider with so many features that no other provide. I am sure the support will find a solution to this problem also.

 

Hoping for your cooperation

Posted

Stevie doesn't run msaccess because we don't run Microsoft operating system. The local database options available are MySQL, PostgreSQL, and SQLite. If you find an msaccess database with remote access enabled you could connect to that, or you could convert your database to something that will work on our servers.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...