Aashim Posted June 13, 2013 Posted June 13, 2013 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 1
Ice IT Support Posted June 13, 2013 Posted June 13, 2013 It seems that driver is not installed on our system (see http://area51.heliohost.org/php/phpinfo.php). 1
Aashim Posted June 13, 2013 Author Posted June 13, 2013 It is installed, the server is Stevie. It's showing odbc under pdo This is phpinfo of server Stevie. Plz help odbc ODBC Support enabledActive Persistent Links 0Active Links 0ODBC library unixODBCODBC_INCLUDE -I/usr/includeODBC_LFLAGS -L/usr/lib64ODBC_LIBS -lodbc Directive Local Value Master Valueodbc.allow_persistent On Onodbc.check_persistent On Onodbc.default_cursortype Static cursor Static cursorodbc.default_db Not yet implemented Not yet implementedodbc.default_pw ******** ********odbc.default_user Not yet implemented Not yet implementedodbc.defaultbinmode return as is return as isodbc.defaultlrl return up to 4096 bytes return up to 4096 bytesodbc.max_links Unlimited Unlimitedodbc.max_persistent Unlimited Unlimited PDO PDO support enabledPDO drivers sqlite2, mysql, pgsql, odbc, sqlite pdo_mysql PDO Driver for MySQL enabledClient API version 5.1.56 PDO_ODBC PDO Driver for ODBC (unixODBC) enabledODBC Connection Pooling Enabled, strict matching
Krydos Posted June 14, 2013 Posted June 14, 2013 Where is this msaccess database hosted, and what port is it running on?
Aashim Posted June 14, 2013 Author Posted June 14, 2013 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
Krydos Posted June 14, 2013 Posted June 14, 2013 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.
Aashim Posted June 14, 2013 Author Posted June 14, 2013 Thanks a lot. I guess than I have to convert them first.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now