catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Database Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 05-03-2005, 05:17 PM   #1 (permalink)
Registered User
 
Join Date: Mar 2005
Posts: 5
PHP and MSAccess

I am trying to access my Access database using PHP (and I am also new to web programming, so I could easily have overlooked something very simple!)

This is a snippet of code I am using:

PHP Code:
$db "databaseName" #This is my DSN
    
$connection odbc_connect($db"""");
$result odbc_do($connection"select * from table1");

odbc_result_all($result"BORDER=1");
odbc_close($connection); 
I expected this file, when called, to display the contents of table1. I have also tried using the absolute path to the database to no avail.

Any help will be greatly appreciated.
KBeecher is offline   Reply With Quote
Old 05-03-2005, 10:07 PM   #2 (permalink)
Administrator
 
Jacob's Avatar
 
Join Date: May 2003
Posts: 1,299
You can see a DSN-Less connection here: http://aspn.activestate.com/ASPN/Coo.../Recipe/163447

Hope that helps...

Regards,

Jacob
Jacob is offline   Reply With Quote
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.