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
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

Edited by taquitosensei
Link to comment
Share on other sites

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

Edited by paulha
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.