Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 20th, 2003, 05:30 AM
pb7 pb7 is offline
Authorized User
 
Join Date: Jun 2003
Location: Lancaster, , United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default connecting PHP to MS Access

Hello,
i am currently conducting a study comparing the effectiveness and efficiency of ASP and PHP at various levels of functionality.
Among other things, I wish to test database connectivity. while I am OK with connecting PHP to MySQL, ASP to mySQL and Access, as far as I know, the only way of connecting PHP to Access is via ODBC , which is not a prticularly efficient and speedy way of establishing connection.
Am I right or is it possible to use a different type of connection?
Thanks in advance for your help,

Philippe
__________________
Philippe
 
Old February 19th, 2004, 08:04 AM
Authorized User
 
Join Date: Feb 2004
Location: Karachi, , Pakistan.
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to knight
Default

As far as speed is concren you are right but i think this the only solution till i writing but its too reliable as far as security is concren

 
Old February 19th, 2004, 01:13 PM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

no, odbc isn't the only way to connect to access.

you should try out ADOdb, a database class library.

http://www.databasejournal.com/featu...le.php/2222651



 
Old February 20th, 2004, 01:48 AM
Authorized User
 
Join Date: Feb 2004
Location: Karachi, , Pakistan.
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to knight
Default

I have check the adodb lib but it also connects to ms-access via odbc_connect() and its also required data source name (DSN) it is actuly an odbc connection what is the diffrence just tell me?
 
Old February 20th, 2004, 04:05 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't think there's a difference, then. Using the Adodb class probably just gives you a much more user friendly interface to the database than using the odbc functions. And yes, I do understand that "more user friendly" is a relative term.

Part of the problem is that Microsoft's databases are only accessible as COM objects or via the ODBC or OLE DB interfaces. PHP doesn't have an OLE DB extension, nor do I know of one being developed. I don't think that Access is a robust enough database to merit the writing of an Access-specific extension, either. Most people who use a MS database for any sort of website are probably going to use SQL Server.


I suggest writing your PHP test site using a database abstraction layer, such as the PEAR DB wrappers. That way, you write your script just once. The interface to the database is the same regardless of which database you're actually using. That is, you make function calls on a generic DB object, not to something specific like MySQL, SQL Server, ODBC, or Postgres. Behind the scenes, you set up which database the generic functions will forward the calls to.

This means that you only have to write the code once, and should your database change, you just swap out the implementation files without touching a single line of the actual program code.

I think this gives you the most flexible and efficient mechanism for testing multiple databases with the same code. At least, in PHP.


Take care,

Nik
http://www.bigaction.org/
 
Old September 24th, 2004, 05:04 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey iam learning php come you please help me
how do i connect ms access
do the database have to be in specail folder?
do have install apache could i not just test it through my website which support php?

please help





Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access connecting to Oracle Problem Corey Oracle 2 March 21st, 2007 02:52 AM
MS Access - Connecting to dartcoach VB.NET 2002/2003 Basics 2 February 27th, 2007 12:05 PM
Connecting MS Access using Struts roopesh_dubey Struts 0 February 18th, 2007 02:43 AM
connecting PHP to an MS Access database pb7 PHP Databases 1 September 18th, 2003 04:28 PM
Problem: JSP connecting to MS Access amcp2002 JSP Basics 3 August 12th, 2003 12:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.