PDA

View Full Version : PHP and Microsoft Access



lwapunte
11-07-2006, 09:36 AM
Hi Guys :D

My Name is Luis. I need to add a module to my site, this module must use PHP to connect to Microsoft Access (*.mdb). I Know a way to do this using ADO.

$conn = new COM("ADODB.Connection") or die("Cannot start ADO");

Can I use this aproach (Microsoft Data Access Components MDAC ) in bluehost to connect to Access?

Could someone explain me another way to do this?

Thanks

Pethens
11-07-2006, 10:00 AM
Chances are you can't do it this way. I'd be surprised if either ADO or Access has been ported to Linux. Your best bet is to migrate to MySQL by dumping your Access database as SQL and loading it into MySQL with something like

mysql -u USER -p < myaccessdb.sql

Or you may be able to use PhpMyAdmin for the same task. Then cross your fingers and hope the SQL dumped by Access isn't too different from what mysql expects.

aceofspades
11-07-2006, 12:22 PM
you definitely shoudlnt use acces it is possibly the worst database ever created. Even XML files are better than access.

lwapunte
11-07-2006, 01:09 PM
Yes, migrate Access to Mysql is a solution, but I hope to use this if other ways donīt work.
Thanks

lwapunte
11-07-2006, 01:11 PM
Yes, But it is not matter of the best option. I must use Access. Because, All the data are in that format.

Thanks

aceofspades
11-09-2006, 05:58 AM
you can convert the database. Then you wont have to worry bout using access. Access is probobly the worst database you can possibly use for web applications.

You could also use PEAR::DB instead of Ado because everyone who has PHP installed also has PEAR::DB installed.