Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 21st, 2002, 04:12 PM
neutcomp neutcomp is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: The Netherlands
Posts: 24 neutcomp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 15 sec
Reputation Power: 0
Question PHP and Access Database!

Hello,

I have a website build with PHP and I have a Access database.

How can I make a connection to this database and how can I get information out of it?

Not just like mysql_connect($host, $name, $pass)
Or mysql_query("select * from people where id='1' ")

thanxx for the help!

Cya
Bjorn

Reply With Quote
  #2  
Old September 21st, 2002, 11:33 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
i dont know if you cant connect to an access database with php???

Reply With Quote
  #3  
Old September 22nd, 2002, 01:10 AM
confuxion confuxion is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Burlington, VT
Posts: 28 confuxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no can do

Recently went through the headache of trying to do it and had no success. Don't think there is a way - at least not one that I know of.

Reply With Quote
  #4  
Old September 22nd, 2002, 03:16 AM
neutcomp neutcomp is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: The Netherlands
Posts: 24 neutcomp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 15 sec
Reputation Power: 0
Oke but maby It is possible to include a ASP file into PHP orsomething?

I cant imagine that such sophisicated language cannot make a connection to a access database!

Cya
Bjorn

Reply With Quote
  #5  
Old September 22nd, 2002, 03:35 AM
confuxion confuxion is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Burlington, VT
Posts: 28 confuxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I agree. You'd think it would be relatively easy. Maybe there is a way - hopefully someone will reply w/ better news.

Reply With Quote
  #6  
Old September 22nd, 2002, 11:26 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Neutcomp,

Take a look here... You can use Access, you'll just need to use an ODBC driver.

Hope that helps!
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #7  
Old September 22nd, 2002, 07:06 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Quote:
I cant imagine that such sophisicated language cannot make a connection to a access database!


Hmm, maybe the guys at php realised that access is a pretty ****ty database and decided not to implement it.

Reply With Quote
  #8  
Old September 22nd, 2002, 07:17 PM
wAr-AnGeL wAr-AnGeL is offline
Forum Security
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Behind You
Posts: 479 wAr-AnGeL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 50 sec
Reputation Power: 8
Send a message via ICQ to wAr-AnGeL Send a message via AIM to wAr-AnGeL
lol ya, probably. mysql all the way
__________________




"Only Linux users see the end of crashes."
- Pl4t0

Reply With Quote
  #9  
Old September 22nd, 2002, 07:32 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Quote:
Originally posted by Ben Rowe


Hmm, maybe the guys at php realised that access is a pretty ****ty database and decided not to implement it.


Hehehe... Well put! But seriously, Access isn't really a development database... It's uses are more for organization and for personal use.

Think about it, it's packaged with MS Office!

Reply With Quote
  #10  
Old September 22nd, 2002, 09:34 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
also when it comes to relational databases, acess would be at the bottom of the list. Im learning asp at the moment, and the book im reading, basically says access suxs balls, and thats putting it in a nice way

Reply With Quote
  #11  
Old September 22nd, 2002, 09:58 PM
confuxion confuxion is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Burlington, VT
Posts: 28 confuxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
easy fellas..

Hey, I couldn't agree w/ you guys more about the deficits Access presents when doing more sophisticated projects. But lets have a little more objectivity here, ah? As web developers, we all may be faced w/ such a situation where either the client implicitly requests this 'dreaded' scenario, or some other mitigating circumstance that may actually force us to explore the notion of making PHP and Access shake hands. Isn't that inclusive of the ultimate goals for open source programming? The ability to break down the proprietary walls built by the would-be software monopolies. Food for thought.

Reply With Quote
  #12  
Old September 24th, 2002, 05:49 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Confuxion,

I couldn't agree with you more... But these are just personal preferences that I'm sure most of us have (whether they be the same or not)...

The fact of the matter is that when it comes down to it, you would want to use the best tools to get the job done. If a client requests Access, then by all means you would have to use it. But there are circumstances where informing the client of a better and more efficient product may get the job done sooner, and will reduce costs in the long run. Besides, the alternative may be a low-cost or no-cose (MySQL) solution.

Reply With Quote
  #13  
Old September 24th, 2002, 06:55 PM
confuxion confuxion is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Burlington, VT
Posts: 28 confuxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Point taken

Yeah, the price issue. Yet another reason to go w/ MySQL, indeed.

Reply With Quote
  #14  
Old September 24th, 2002, 09:13 PM
ejbe99 ejbe99 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 43 ejbe99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 40 sec
Reputation Power: 8
Guys - MySQL = good for speed. But it's definitely not the best!

Reply With Quote
  #15  
Old September 24th, 2002, 11:26 PM
confuxion confuxion is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Burlington, VT
Posts: 28 confuxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
elaborate, please

So what is, if you don't mind me asking

Reply With Quote
  #16  
Old September 25th, 2002, 03:09 AM
neutcomp neutcomp is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: The Netherlands
Posts: 24 neutcomp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 15 sec
Reputation Power: 0
Hold!

Oke back to the topic!
PHP Code:
<?
if (!$conn = new COM("ADODB.Connection"))
exit(
"Unable to create an ADODB connection<br>");

$strConn "DRIVER={Microsoft Access Driver (*.mdb)},DBQ=d:\www\thevictory.nl\database\victory  .mdb;"""""

$conn->open($strConn); 
$conn->Close();

//Do something here!

$conn null;
?>


This is what I thought it would be. Yes there is no password on it. :-)

Error:
Parse error: parse error in d:\www\thevictory.nl\www\asp\connectie.php on line 12

I also tried this!

PHP Code:
 $strConn "DRIVER={Microsoft Access Driver (*.mdb)},DBQ=d:\www\thevictory.nl\database\victory  .mdb;"


Error:
Warning: Invoke() failed: Exception occurred. in d:\www\thevictory.nl\www\asp\connectie.php on line 14

There is NO DSN connection.

Thanxx
Bjorn

Reply With Quote
  #17  
Old September 25th, 2002, 03:22 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Quote:
Originally posted by ejbe99
Guys - MySQL = good for speed. But it's definitely not the best!


Not sure if it's the best... I haven't used many other database systems... In fact, we're starting to use Oracle, but I haven't had much experience with it yet.

As for the best database, I think it all comes down to preference and project requirements.

What would you say is the best, if one exists?

Reply With Quote
  #18  
Old September 25th, 2002, 03:25 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Re: Hold!

Quote:
Originally posted by neutcomp
Oke back to the topic!
PHP Code:
 $strConn "DRIVER={Microsoft Access Driver (*.mdb)},DBQ=d:\www\thevictory.nl\database\victory  .mdb;"""""


Bjorn,

Try this:

PHP Code:
 $strConn "'DRIVER={Microsoft Access Driver(*.mdb)},DBQ=d:\www\thevictory.nl\database\v  ictory.mdb;','',''"


Try using single quotes.. Other wise try using the concatenation symbol "." to join each part of the connection string.

Reply With Quote
  #19  
Old June 20th, 2005, 12:19 PM
rewen rewen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 1 rewen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m
Reputation Power: 0
Wink Google ;)

PHP Code:
<?
$conn 
= new COM("ADODB.Connection") or die("Cannot start ADO"); 

// Connection string.
$conn->Open("Provider=Microsoft,.Jet.OLEDB.4.0; Data Source=C:\\inetpub\\wwwroot\\php\\mydb.mdb");

// SQL statement to build recordset.
$rs $conn->Execute("SELECT myfield FROM mytable");

// Display all the values in the records set
while (!$rs->EOF) { 
    echo 
"Value: "$rs->Fields("myfield")->value "<br>\n";
    
$rs->MoveNext();

$rs->Close(); 
?>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > PHP and Access Database!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek