Forum Moderators: coopster

Message Too Old, No Replies

connecting to a acess DB

need some help

         

flying monkey

2:56 am on Apr 21, 2004 (gmt 0)

10+ Year Member



i have been connecting to an acess db by ODBC. i am wondering if there is another way to connect to it.

coopster

9:37 pm on Apr 21, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



To the best of my knowledge, there are no PHP MS-Access-specific API's available. ODBC is it. Have you considered alternative databases?

ergophobe

10:03 pm on Apr 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Boy, I should know this, since I spent about a week analyzing my options and testing.

I ended up just redesigning from zero and so far users are very pleased. There are some things you just can't get with MySQL over the network that you can working with a local replica on your own computer, but there are enough advantages that so far only smiles and the occasional constructive suggestion.

There is some strange Access system that lets you access the DB through an interface that Access creates (but which worked terribly for me and I can't imagine anyone would use it).

For PHP and Access, I think you're stuck with ODBC.

It's very easy to get your tables from Access into MySQL, but if you have a lot of VBA stuff running your database, it may take some effort to get all the functionality. On the other hand, if you are careful about your SQL (no proprietary stuff like LIMIT), once transferred to MySQL it will be easy to move around.

Tom

flying monkey

2:45 am on Apr 22, 2004 (gmt 0)

10+ Year Member



cool thanks. i was considering moving to mysql, but i dont know how to use mysql and am more comfertable with acess. i was just wondering if there was another way to connect, cause odbc is giving me some trouble.

ergophobe

4:09 pm on Apr 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you using both Access and PHP/ODBC interfaces? In other words are you creating and maintaining the DB with Access and then just making it available online via ODBC?

If so, maybe you should stick to Access. If not, transitioning from Access to PHP/ODBC is not much different than transitioning to PHP/MySQL (Got to learn SQL either way).

Another thing to consider. Must your DB have real-time data? Another option would be to maintain it in Access and then just periodically update to MySQL. Depending on the data, it may be easy (large text/blob fields and various character encoding issues caused some problems for me).

In my case, I was transforming an Access DB with a fairly small amount of custom VBA. It didn't make that much difference to me whether the underlying database was in Access or MySQL. More important was how easy it was to design the interface, how easy to run the server and so forth. Since I know a little about Linux/Apache/PHP/MySQL, but next to nothing about IIS and Access run in a server environment, I decided the LAMP solution was best.

Coopster was also kind enough to phone a friend of his who had done similar conversions and reported constant headaches with Access (record locking) once there were more than a few users and said that often in such situations you get stuck on a bothersome and expense upgrade curve. We don't have that many users (internal project DB), but we also don't have that much money (IIS, MSSQL, etc).

Good luck, whatever you do.

flying monkey

11:24 pm on Apr 23, 2004 (gmt 0)

10+ Year Member



thanks look i will stick to acess. it will keep my learning curve down so i can get on with the rest of the site. thanks for ur all help.