Jump to content

ODBC Access connection failed to file on shared drive


shocker-z

Recommended Posts

Hi here is a quit breif on my current situation..

 

I have been developing a web frontend to our company database on a local copy of the database, this has been tested and secured and working fine localy but when i change the location of the access file in odbc to the live database on the shared drive i get connection failed. So at first i thought ahh permissions but no.. there all fine!

 

I went into MS excel and connected and pulled data off my odbc connection totaly fine??

 

any idea's on why it works for excel but my page returns connection failed? here is my connection code that produces the error.

Noo error is shown after "Connection Failed:" any way to get an error reported?

 

$conn=odbc_connect('pnctables','','');
if (!$conn) {
exit("Connection Failed: " . $conn);
}

 

Regards

Liam

anyidea what may be causing the issue? or possibly a workaround?

 

Kind of taking it that if you havn't managed it then there not much chance of me managing it too lol

 

Weird how it can pull data via excel --> odbc --> access database on shared drive yet it cant pull it via PHP :S

 

**

Gutted now as i spent a few days building it, now im gonna look a bit umb going ahh it dont wokr on shared drive boss. lol

 

 

Regards

Liam

*SOLVED*

 

I decided to see if i could create a directory from PHP on the mapped drive and it didnt using this code:

 

mkdir("S:/dbf/data/test/", 0700);

 

But using

 

$mkdir=mkdir("//pdc/data$/dbf/data/test/", 0700);

 

Did work, so in my ODBC administrator i changed it from S:/dbf/data/test/ to //pdc/data$/dbf/data/pnctables.mdb and WALLAH! it's working :)

 

Might want to remember this one as all over the net every site is on about permissions and IIS setting sbut infact is just ODBC.

 

Regards

Liam

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.