View Full Version : Can PHP read a MS Access database?
Leinad
05-30-2003, 03:11 AM
Hi PHP experts,
I wonder if PHP can read a MS Access database?
if so, can you guys share some light on how to do it?
if possible, a few lines of code will do.. I might be able to work it out myself..
what else do I need to setup in order to read it?
firepages
05-30-2003, 12:08 PM
you need to use the ODBC functions , there are some examples over at http://www.php.net/odbc
your first issue is creating a system DSN (control panel >> administrative tools >> data services(ODBC)) for your data source let is know if you have any problems with that.
Leinad
05-30-2003, 01:43 PM
What if the access file is on the server? will that work too?
e.g. http://www.myhost.com/accessfile.mdb
Darknight
05-30-2003, 01:51 PM
If you can not get a DSN.....
Your out of luck.
For access you might try the tools access 2000 has for getting data 'on the web'.
Also...
It is not a good idea to put database files in folders under the web tree... unless you don't mind people downloading your database. :eek:
Vinsar
05-30-2003, 08:25 PM
You can use AdoDb tutorial for DSN less connection,
Get it at
http://php.weblogs.com/ADODB
And tutorial at
http://php.weblogs.com/adodb_manual
optimism_
06-01-2003, 02:11 PM
you can create DSNs using a perl script cant you?
Vinsar
06-08-2003, 03:30 PM
Perl can do almost any thing on linux box, but why use perl if you are working on php, and now days many can not work on perl, moreover if you are using php on Windows then do u think perl can do that, so best practice is to stick to the programming language that you are using untill unless the feature is not there in that language.
As I think, msaccess databse is awailable on Windows, I dont know if the mdb files can be used in linux, if yes then I would like to know how?
optimism_
06-08-2003, 03:33 PM
no the point is, if you need to make a DSN, and you dont have direct access to the box, you can always use a perl script to make a DSN. i have a book with a sample script to do just this if anyone wants it
Vinsar
06-08-2003, 03:39 PM
A book or any form of knowledge sharing is always welcome, if it is in electronic form (like pdf) do tell us how to get it.
Thanks in advance.
optimism_
06-08-2003, 03:41 PM
sorry, its a 600 page paper back on the topic of JS, Perl and integrating the 2, along with resource section on every built in function. but of you want the DSN-making script, when i have time, ill type it up
Vinsar
06-08-2003, 03:59 PM
Hope you will find time to do so soon,
In the meantime you can tell us the name and publisher of the book, so if it's awailable in our neighbhourhood we can buy it.
I am very much fond of having good books in my library. Good books always helps.
Thanks any ways.
optimism_
06-08-2003, 04:01 PM
"Perl, CGI, and JavaScript Complete" published by Sybex.
ISBN: 0-7821-2780-0
RRP: US $19.99
CAN:$31.95
UK $14.99
Vinsar
06-08-2003, 06:47 PM
Thanks optimism_
I think I can get this book here.
You are a good help,
and also can you recommend a good book to learn PHP, it should be easy to learn and understand.
optimism_
06-08-2003, 06:50 PM
i have a couple of ebooks on the subject of php which ill be happy to email you, however, i have found webmonkey and zend.com to be useful, as well as the .chm version of the php docs, which i have open pretty much all the time while coding
Vinsar
06-08-2003, 07:08 PM
Man you are quick,
I have php manuals, been to zend also, but I think they are not for beginners,
you can mail me ebooks at vinayak@vinsar.net
thanks and waiting.
optimism_
06-08-2003, 07:15 PM
yeah, i guessed it'd be you when i saw the email toast
anyway, i emailed 3 books that use (all pdf) and they should be there soon (aol's asking 20mins to upload them all)
good luck with the progging
optimism_
06-08-2003, 08:10 PM
did you get the email? i left it sending while i went for dinner and when i came back it had blue screened, so i cant tell whether it sent or not :S
scroots
06-08-2003, 09:00 PM
go for learning php is the php manual www.php.net/manual/en/
it has everything php can do with comments by users and examples and its really good.
scroots
optimism_
06-08-2003, 09:01 PM
ahem:
Originally posted by optimism_
however, i have found webmonkey and zend.com to be useful, as well as the .chm version of the php docs, which i have open pretty much all the time while coding
we covered that one
Vinsar
06-09-2003, 02:21 AM
optimism_
I checked my mailbox, but sorry to say I have not received the mails you sent, hope you can send them again.
Spookster
06-09-2003, 04:03 PM
Vinsar and optimism_,
Take your conversation elsewhere. You are violating our rules first by getting off topic and chatting. Secondly most ebooks we have seen have terms of use and usually prohibit copying of the ebooks. This forum will not be used for illegal requests as stated in our forum rules which I think both of you need to read:
http://www.codingforums.com/rules.htm
optimism_
06-09-2003, 05:35 PM
i appologise for going off topic and will end the conversation here, however these ebooks are ok, they have been distributed by the publisher [i am not enitrely sure why] and so are not illegal in that respect
again appolgies for going off topic
Vinsar
06-10-2003, 09:34 AM
Sorry me too.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.