Jump to content

Cannot make a dsn-less connection with a network path, ms access + php


Recommended Posts

HI, i have a dsn less connection to a ms access database with php.

Im using this connection script, but actually the database is not in the program dir, it is in the network drive y:\

$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("Crafta.mdb") ." ;DefaultDir=". realpath(".");

Im trying to do like this: with no results...

$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("y:\Crafta.mdb") ." ;DefaultDir=". realpath("y:");

Also I tried this with no results: realpath("\\nas1\workware\OrderManager\Crafta.mdb")

and yes, its in the same workgroup...

NOte: The \\nas1 its a unix shared dir, not a windows share

Thanks in advance.

Link to comment
Share on other sites


DSN= Data Source Name

DNS= Domain Name Service

DSN <> DNS

Have you tried it on a windows share, just to be sure it's not a issue with unix

Edited by IcemanND
Link to comment
Share on other sites

This is the scneario, i have a unix samba share in my network, there are all the office stuff, including a share to a Ms access database wich its accessed from many windows clients.

Now i need to access that ms access database from http, so i installed apache+php in a windows server in the same workgroup, i did succesfully test when the ms access database was on the local windows server, but once i tried with the database in the actual server it didnt worked, i found few scripts in google about odbc, ole, and dsn-less connections, all of them worked when database resides in the local machine, but don work when database is in the actual unix samba share.

This is the script used with local machine test:

//$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\POS-SERVER\C$\om\xxafta.mdb") ." ;DefaultDir=". realpath("\\\\POS-SERVER\C$\om");

this is the script used for samba share, it didnt work:

//$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("\\\\nas1\workware\OrderManager\xxafta.mdb") ." ;DefaultDir=". realpath("\\\\nas1\workware\OrderManager");

What can I do? any adcvices will be apreciated/.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...