sugar2 Posted May 20, 2006 Share Posted May 20, 2006 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 shareThanks in advance. Link to comment Share on other sites More sharing options...
ringfinger Posted May 20, 2006 Share Posted May 20, 2006 Since its "DNS-less" have you tried \\x.x.x.x\Crafta.mdb ? Link to comment Share on other sites More sharing options...
IcemanND Posted May 20, 2006 Share Posted May 20, 2006 (edited) DSN= Data Source NameDNS= Domain Name ServiceDSN <> DNSHave you tried it on a windows share, just to be sure it's not a issue with unix Edited May 20, 2006 by IcemanND Link to comment Share on other sites More sharing options...
sugar2 Posted May 20, 2006 Author Share Posted May 20, 2006 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 More sharing options...
tain Posted May 20, 2006 Share Posted May 20, 2006 Has this db ever worked when stored on the unix server? Please verify that it will work there locally and then try accessing it remotely. Link to comment Share on other sites More sharing options...
ringfinger Posted May 26, 2006 Share Posted May 26, 2006 DSN= Data Source NameDNS= Domain Name ServiceDSN <> DNSHave you tried it on a windows share, just to be sure it's not a issue with unixMy bad. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now