Re: [OT] Connect to local linux ms access jet database via odbc from php or java



Mirko Scurk schrieb:
Hi!

I originally sent this post to unixodbc support list but received no
answer. Its crucial to me to solve this problem so any help will be
apreciated.

I spent some time googling and trying to establish connections from linux
pc to local mdb file but had no luck. Here is my configuration:


I actually don't have much experience with either ODBC or PHP, but I
dare to give my 2 cents anyway. Two things that I as a total newbie
would check out:

# cat /etc/odbc.ini
[ODBC]
Trace=yes
Tracefile=/tmp/trc.log

First: Is there any helpful info about the failed login in the above
mentioned trace log? Or any other system log?


[LOIR]
Description = MicrosoftAccessDatabaseofLOIR
Driver = MDBToolsODBC
Database = /var/www/storage.mdb
Server = localhost
Username = ""
Password = ""


(...)


# cat /var/www/access.php
<html>
<body>

<?php
$conn=odbc_connect('LOIR','','');

(...)

I tried with isql and everything is working fine:

# isql LOIR
+---------------------------------------+
| Connected! |

Second: Since the login credentials for the .mdb file are already
specified in the odbc.ini, it is perhaps counterproductive to specify
them again in the php odbc_connect call. Does it work if you leave them
out, like with isql? Or if you actually set a real password for the .mdb
file?

Just basic stuff, I know. But perhaps it helps.

cheers,
Guido



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages