473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Issue accessing MS Access database on another server

9 New Member
I have searched this forum, and the web, and I have not been able to find a solution to my issue. I may not have used the right search information to find the answer, but I found a lot of issues close to mine, but nothing has helped.

We are running Apache/2.2.4 (Win32) PHP/5.2.3.

I am trying to use the odbc_connect to connect to an MS Access database that is on another server. I have tried to use both a system DSN, as well as putting the connection information into php. For example...

$con=odbc_connect("mysystemdsn","","") or die("didn't work");

$con = odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" ."\\myotherserver\d$\mydb.mdb","","") or die("didn't work");

I have also tried mapping a network drive so I did...

$con = odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" ."z:\mydb.mdb","","") or die("didn't work");

When not using the system DSN, I get...

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides., SQL state S1009 in SQLConnect in C:\antoxrpt\index.php on line 7
didn't work

When using the system DSN, I get...

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\antoxrpt\index.php on line 4
didn't work

The above errors were received when I was going through a web page. If I went to the machine and ran my file through batch PHP (i.e. c:\php\php.exe myfile.php), it would successfully connect to the database and give me the expected results.

I am assuming that it is a security issue, but I just can figure out what access is need for what user. I have seen articles about IUSR_servername user, but most of them say it is for IIS. I have tried it anyway without any success. I have tried both IUSR_ and IUSER_, since I have seen references to both.

One other thing, I copied the MS Access database to the local server and it worked fine that way too. The only issue is that the database is part of a vendor application and I need realtime access to it so I can't move it. I also can't install a web server on the other machine.

Any help would be greatly appreciated.

Thanks
Feb 15 '08 #1
1 3695
pbmods
5,821 Recognized Expert Expert
Heya, VB Ace (VB/PHP Ace?).

I have recommended that a moderator move this thread to the Access forum. They may know what's going on here.
Jun 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4303
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
11
2261
by: darcykahle | last post by:
I have stumbled upon an interesting issue with regard to compaction of an access frontend database which resides on a DFS target that utilizes FRS to mirror the sharepoint, and I was wondering if...
3
7886
by: Russell Read [MSFT] | last post by:
Hi all, I am using VB script in ASP to access a MS Access database. This works fine until I want to access the same db placed on a file share. The code I am using is... 'create connection...
0
12049
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
19
1629
by: Materialised | last post by:
I have written the following code as a test, (yes I know it is a resource hog). Basically it pulls all images out of a MySQL table. <?php $conn = mysql_connect(host, user, pass);...
5
2251
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
5
3895
by: Mike | last post by:
I'm having trouble accessing SQL2005 Standard Edition as a second instance of SQL Server where the first instance is SQL 2000 Enterprise Edition. I installed SQL 2005 as a named instance...
3
1369
by: crombinator | last post by:
So here is the not so simple situation. In our work environment one entity controls access to servers. In our own webspace they have setup a user to access a mysql database. We brought in a...
2
2137
by: le0 | last post by:
guys, this is my first time to deploy website to the server, but every time i access the page this error always appears. ...
0
7074
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.