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

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cannot make a dsn-less connection with a network path, ms access + php what path should i use for samba servers? Rate Topic: -----

#1 User is offline   sugar2 

  • Group: Members
  • Posts: 6
  • Joined: 27-July 05

Posted 19 May 2006 - 07:10 PM

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.


#2 User is offline   ringfinger 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 928
  • Joined: 18-June 05

Posted 19 May 2006 - 07:28 PM

Since its "DNS-less" have you tried \\x.x.x.x\Crafta.mdb ?

#3 User is offline   IcemanND 

  • MSFN Junkie
  • Group: Super Moderator
  • Posts: 3,239
  • Joined: 24-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 May 2006 - 08:55 PM

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

This post has been edited by IcemanND: 19 May 2006 - 08:56 PM


#4 User is offline   sugar2 

  • Group: Members
  • Posts: 6
  • Joined: 27-July 05

Posted 20 May 2006 - 12:29 PM

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/.

#5 User is offline   tain 

  • Cyber Ops
  • Group: Super Moderator
  • Posts: 3,412
  • Joined: 24-September 05
  • OS:none specified
  • Country: Country Flag

Posted 20 May 2006 - 01:57 PM

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.

#6 User is offline   ringfinger 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 928
  • Joined: 18-June 05

Posted 25 May 2006 - 07:22 PM

View PostIcemanND, on May 19 2006, 08:55 PM, said:

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


My bad.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy