Jump to content

php connect to ms access database


paulha

Recommended Posts

I have a website that runs on a hosted server with iis6 and php5.2.5 installed the website is written in asp3.0 (sorry) and fetches its data from an ms access database (again sorry).

The database is stored on the physical path: D:\databases\database.mdb and there is no use of username/password.

I want to create PDF files on the fly using FPDF so a database connection in php is the challenge, I've tried loads of examples from the web but unsuccesful so far.

My phpinfo:

http://www.freebits.nl/images/211screen1.jpg

http://www.freebits.nl/images/424screen2.jpg

Thanks in advance for the effort

Paul

 

Link to comment
https://forums.phpfreaks.com/topic/286859-php-connect-to-ms-access-database/
Share on other sites

I would create an ODBC connection to the database. Then use pdo_odbc. Judging from your phpinfo you'll need to turn on pdo_odbc. It should be in the core php on windows. By adding

extension=php_pdo.dll

and

extension=php_pdo_odbc.dll

to php.ini

 

then take a look at

http://www.sitepoint.com/using-an-access-database-with-php/

 

EDIT - I just saw the part about asp 3.0 and this might not 100% apply to you.

 

I have a website that runs on a hosted server with iis6 and php5.2.5 installed the website is written in asp3.0 (sorry) and fetches its data from an ms access database (again sorry).

The database is stored on the physical path: D:\databases\database.mdb and there is no use of username/password.

I want to create PDF files on the fly using FPDF so a database connection in php is the challenge, I've tried loads of examples from the web but unsuccesful so far.

My phpinfo:

http://www.freebits.nl/images/211screen1.jpg

http://www.freebits.nl/images/424screen2.jpg

Thanks in advance for the effort

Paul

Thanks for the fast response,

I will contact the provider to add the extensions.

Is an username and password mandatory, I don't have to use them in ASP3.0.

VMT Paul

 

Edit: the page is written in ASP, but I'll use php pages to create the pdf files using fpdf

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.