|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
Quote:
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. |
|
#4
|
||||
|
||||
|
so how does it behave. Make sure you have error reporting turned on. Does it give an error?
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > DB interactions - ODBC With MS Access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|