PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 1st, 2008, 02:00 PM
micah1086 micah1086 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Seattle, USA
Posts: 131 micah1086 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 29 sec
Reputation Power: 2
Send a message via AIM to micah1086
DB interactions - ODBC With MS Access

Hi all--

I've been doing a project which requires me to pull data from a remote MS Access '97 database (running Win 2003)onto my Debian Linux machine running PostGreSQL and PHP5 through an Apache 2 web server.

The problems I'm having are as follows:
1) The SQL Syntax used in MS Access does not seem to be fully functional with my PHP script (ie. I cannot do SELECT COUNT(*) FROM device; in PHP but in MS Access, it works perfectly fine).
2) In order to access the database, I have to mount a remote fileshare to my server in order to utilize the .mdb file. Is there a way to access the System DSN on the remote machine directly rather than having stuff setup on my linux box?

I know that somebody will harass me about it being an Access 97 database but, because the nature of this project is interacting with legacy power meters, we cannot upgrade that database.

Any ideas??
__________________
--Micah

Reply With Quote
  #2  
Old May 6th, 2008, 12:21 AM
icandothat's Avatar
icandothat icandothat is offline
Moderator
Click here for more information.
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 1,551 icandothat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 2 h 55 m 16 sec
Reputation Power: 3
are you sure the count query doesn't work? maybe you're accessing the wrong value. I know in PHP connecting to ORACLE, ORACLE returns all keys in the associative response in all caps so you might say "select name from table" but you have to access the response as "NAME" not "name". you might also try

"select count(*) as count from table"

then you can access the response as count or COUNT
__________________
There is no spoon.

Reply With Quote
  #3  
Old May 6th, 2008, 08:03 AM
micah1086 micah1086 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Seattle, USA
Posts: 131 micah1086 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 29 sec
Reputation Power: 2
Send a message via AIM to micah1086
Quote:
Originally Posted by icandothat
are you sure the count query doesn't work? maybe you're accessing the wrong value. I know in PHP connecting to ORACLE, ORACLE returns all keys in the associative response in all caps so you might say "select name from table" but you have to access the response as "NAME" not "name". you might also try

"select count(*) as count from table"

then you can access the response as count or COUNT


I've tried it with and without the "as x" clause in the select statement. It behaves the same both ways but in the MS Access SQL view, both work and return the value I expect.

Reply With Quote
  #4  
Old May 7th, 2008, 01:50 PM
icandothat's Avatar
icandothat icandothat is offline
Moderator
Click here for more information.
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 1,551 icandothat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 2 h 55 m 16 sec
Reputation Power: 3
so how does it behave. Make sure you have error reporting turned on. Does it give an error?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > DB interactions - ODBC With MS Access


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


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway