Jump to content
xisto Community
Sign in to follow this  
asimrsiddiqui

Is php supports MS Access Ms Access Database

Recommended Posts

I want to know that is php supports MS Access databases. And could anyone told me the complete php installation.

I have little bit problem during installation.

<{POST_SNAPBACK}>


If you are installing PHP why are you also looking for free hosting?

 

About PHP installation problems, net is full of very detailed tutorials. And PHP.net also has mailing list. Post your problems there, they are expert.

Share this post


Link to post
Share on other sites

Yes, php supports ms access databases through ODBC. i've actually got a web server installed on my computer called 'Xitami' that i use to test PHP scripts. If you have any trouble with configuring php.ini, i'll send you my one and you can see what you have to edit in it :)

Share this post


Link to post
Share on other sites

php can do odbc, but idon't think access is supported on Xisto? not sure though.try to install winlamp (winlamp.sourceforge.net)install mysql front (you can choose to put the installer on your desktop during the installation of winlampit'll install php & mysqlmysl front is a bit like access, so you'll have no problem using that oneuse mysql databases, they work better with phpbesides, you'll have less problem finding a webhost that uses mysql!

Share this post


Link to post
Share on other sites

I want to know that is php supports MS Access databases. And could anyone told me the complete php installation.

I have little bit problem during installation.

<{POST_SNAPBACK}>


Lets answer what you want, as I myself started off with MS Access for online databases because learning MySQL wouldn't have got my site online quicker, but now it's been converted over to MySQL.

 

Hopefully you run your own web server, else web hosts would have alternative methods you can use.

 

I wrote a tutorial on Installing your own web server for Windows in the HOWTOS AND TUTORIAL page. You will only have to do the Apache and PHP steps for what you need.

 

We have to configure our PHP Scripts to use what is known as ODBC (Open DataBase Connectivity), You will also have to make sure that you have MDAC (Microsoft Data Access Components) installed, anything above Windows 2000 should have it installed.

 

This setup refers to Windows XP Pro, since it's my Windows Operating System I run and is the only way I can explain it as it's been too long since I went back to a prior OS, although put me in front of one and I can do the same thing.

 

You need to goto Control Panel | Administrative Tools | Data Sources (ODBC), then select the System DNS tab at the top and then click on Add. We need to add Microsoft Access Driver *.mdb and click Finish. Data Source Name is what is like our Database name, we use it in our connectivity. I called it MyDB. Next you have select your database file that you will be using with this connection. Click select and browse to your database on your computer, then click OK. You then click on the Advance tab and setup a username and password to connect to this database. For this I'll use root as username and passwordd as the password.

 

Next I create a PHP script called dbcon.php, it's our database connection script, I include this file whenenver I need to connect to the database.

 

<?php $dbcon = odbc_connect('MyDB', 'root', 'password') or die("Error: Connection to Database Failed");
?>

 

And that's how we connect to the database, odbc_connect(); may look familiar, if you have seen mysql_connect(); then that is why. The commands are pretty much the same, yet you've got more control with mysql than MS Access. You should get the PHP Manual it will definitely help you out with other commands like odbc_exec(); etc.

 

The commands are pretty much the same as MySQL so learning how to connect to MS Access database isn't a waste of time, you can convert over to MySQL easier this way. There's also software out there that can convert MS Access to MySQL and vice versa, so if you want to switch it's quite easy.

 

Well if you require any more assistance, don't hesitate to ask.

 

 

Cheers, MC

Share this post


Link to post
Share on other sites

yes you can easily connect to any database management by using suitable odbc.including oracle,ms-access,ms-exel,ms-foxpro,mysql etc,just configure the odbc and use the following code...<?php$dbcon = odbc_connect('database_name', 'user_name', 'password');?>this should work.if u r not sure whether it works just include as 'die' option with an error message.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.