TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-04-2009, 10:24 AM   #1 (permalink)
The Wanderer
 
Join Date: Apr 2008
Location: Cloud 9
Posts: 19
Thanks: 0
Jenski is on a distinguished road
Default MS Access via FTP

Hi guys,

I have always used MySQL with PHP, but I now need to link to an MS Access database.
The MS Access database is on a network drive and the server running PHP needs to access it. How can I connect to it?
Jenski is offline  
Reply With Quote
Old 02-04-2009, 10:47 AM   #2 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

You can use the ODBC extension (http://php.net/odbc) which is similar to your familiar mysql_* collection of functions.
Salathe is offline  
Reply With Quote
Old 02-04-2009, 11:00 AM   #3 (permalink)
The Wanderer
 
Join Date: Apr 2008
Location: Cloud 9
Posts: 19
Thanks: 0
Jenski is on a distinguished road
Default

Thanks,
Is it possible to do <servername>/<path to file> in the connection string with a username / password?
Jenski is offline  
Reply With Quote
Old 02-04-2009, 03:27 PM   #4 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

As far as I can see, from the manual on odbc_connect, it would be something like the following. Though I have to admit that I've never used it before in my entire life.

php Code:
odbc_connect('DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=dbname.mdb', $szUsername, $szPassword);
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ms Access database(MDB) functions Yoosha Absolute Beginners 4 07-11-2008 05:16 PM
access css thorugh javascript freenity Javascript, AJAX, E4X 3 02-29-2008 04:35 PM
Building an Apache-like Access Control List (ACL) Wildhoney General 2 12-14-2007 02:03 PM
Do not allow direct access to php file. Sam Granger Absolute Beginners 6 10-17-2007 03:49 PM
How to access functions of Cpanel? jaswinder_rana Absolute Beginners 3 07-15-2005 05:53 PM


All times are GMT. The time now is 01:42 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design