473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

OleDB Connect string to remote Data

I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
connect ok. If it is is on the server I cannot connect and get the following error.

'Error message.
"The Microsoft Jet database engine cannot open the file ''.
It is already opened exclusively by another user, or you need permission to view its data."

'This Works.
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=c:\test\Contdat.mdb; "

'This doesn't work. Exclusive error
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=\\Server01\NYAccess\Data\Contdat.mdb; "
strC = strC & "Jet OLEDB:System database=\Server01\NYAccess\System.mdw; "
strC = strC & "User ID=UserName; password=UserCode"
Apparently the problem is with the permissions within IIS or on the server.

I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
account has full rights on both the local computer and the server.

I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.

Anyone have any ideas how I can solve this problem?
thanks,

Andy
Mar 15 '06 #1
3 4235
are you missing a slash "\" before Server01 on the 3rd line

should read: \\Server01\NYAccess\System.mdw

?
strC = strC & "Jet OLEDB:System database=\Server01\NYAccess\System.mdw;
"
aseme...@capitalpost.com wrote:
I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
connect ok. If it is is on the server I cannot connect and get the following error.

'Error message.
"The Microsoft Jet database engine cannot open the file ''.
It is already opened exclusively by another user, or you need permission to view its data."

'This Works.
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=c:\test\Contdat.mdb; "

'This doesn't work. Exclusive error
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=\\Server01\NYAccess\Data\Contdat.mdb; "
strC = strC & "Jet OLEDB:System database=\Server01\NYAccess\System.mdw; "
strC = strC & "User ID=UserName; password=UserCode"
Apparently the problem is with the permissions within IIS or on the server.

I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
account has full rights on both the local computer and the server.

I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.

Anyone have any ideas how I can solve this problem?
thanks,

Andy


Mar 16 '06 #2
No, that's a typo from when I pasted into this posting and tried to format it. It also doesn't work if I use a mapped
drive to the server.

I think I've narrowed my problem to the configuarion in the machine.config file in the .net framework setup. I've about
exhausted all other combinations of users and passwords on the local computer, server, and IIS.

I haven't much looked onto the underpinnings of .Net. The machine.config file is massive and apparently it uses a built
in userid whose access rights within Active Directory have to be sufficient to read the file. I haven't figured out how
to do this yet. Technically this may not be an Access database question but a .Net question. Then again I may be
totally off base here.

Anyone else come across this problem?

Andy
On 15 Mar 2006 15:54:27 -0800, ve****@gmail.com wrote:
are you missing a slash "\" before Server01 on the 3rd line

should read: \\Server01\NYAccess\System.mdw

?
strC = strC & "Jet OLEDB:System database=\Server01\NYAccess\System.mdw;
"
aseme...@capitalpost.com wrote:
I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
connect ok. If it is is on the server I cannot connect and get the following error.

'Error message.
"The Microsoft Jet database engine cannot open the file ''.
It is already opened exclusively by another user, or you need permission to view its data."

'This Works.
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=c:\test\Contdat.mdb; "

'This doesn't work. Exclusive error
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=\\Server01\NYAccess\Data\Contdat.mdb; "
strC = strC & "Jet OLEDB:System database=\Server01\NYAccess\System.mdw; "
strC = strC & "User ID=UserName; password=UserCode"
Apparently the problem is with the permissions within IIS or on the server.

I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
account has full rights on both the local computer and the server.

I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.

Anyone have any ideas how I can solve this problem?
thanks,

Andy


Mar 16 '06 #3
I solved my problem. It is not an Access database problem but is a .Net configuation problem.

I had to change a value in the machine.config file in c:\windows\microsoft.net\framework\v1.1.4322\confi g\machine.config

The section reads as follows and defines how a logon user impersonates a windows user. The default had identity
impersonate = "false" and did not work. Changing the value to "True" made it work. My IIS anonymous user is set to
have directory and file rights to the .mdb on the server.

Presumably this "True" value can also me passed from the connect string to override the default "false" in the
machine.config file. I haven't experimented with this yet.

<?--
identity Attributes:
impersonate="[true|false]" - Impersonate Windows User
userName="Windows user account to impersonate" | empty string implies impersonate the LOGON user specified by IIS

password="password of above specified account" | empty string
-->
<identity impersonate="true" userName="" password=""/>

I hope this may be of use to someone.

Andy

On Wed, 15 Mar 2006 19:16:55 GMT, as******@capitalpost.com wrote:
I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local
XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can
connect ok. If it is is on the server I cannot connect and get the following error.

'Error message.
"The Microsoft Jet database engine cannot open the file ''.
It is already opened exclusively by another user, or you need permission to view its data."

'This Works.
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=c:\test\Contdat.mdb; "

'This doesn't work. Exclusive error
strC = "Provider=Microsoft.Jet.OLEDB.4.0; "
strC = strC & "Data Source=\\Server01\NYAccess\Data\Contdat.mdb; "
strC = strC & "Jet OLEDB:System database=\Server01\NYAccess\System.mdw; "
strC = strC & "User ID=UserName; password=UserCode"
Apparently the problem is with the permissions within IIS or on the server.

I am logged in as an administrator on the server and am using the same logon as the anonymous user account in IIS. This
account has full rights on both the local computer and the server.

I have installed Jet 4.0 Service pack 8 and MDAC 2.6 on the local computer without it helping.

Anyone have any ideas how I can solve this problem?
thanks,

Andy


Mar 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Thunell | last post by:
I have a program where i connect to an access database and get some information out of it. I'm using the oledb.3.51 version, my computer doesn't seem to have the 4.0 version, but the computer that...
0
by: silesius | last post by:
I've been using VS 2003 to develop a webapplication using C#. Today I exported the application to a remote webserver I begun experiencing problems. It's a simple application that retrieves some...
5
by: Mike L | last post by:
I'm able to connect to my stored procedure in my local database but not able to connect to my stored procedure in the remote database. I use several different UserID and Password that all should...
13
by: Ron L | last post by:
I am working on an application that is a front-end for a SQL database. While it is not an immediate requirement, the application will probably be required to be able to connect via the internet at...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
0
by: TechWitch | last post by:
I've seen a number of posts from frustrated folks about this topic, with not much offered as a solution. I actually managed to get this to work today, so I thought I'd post for the benefit of...
2
by: psychomad | last post by:
Please, can someone help me out to solve this error, i've been searching throughout my codes and yet i didnt succeed in finding the error!!!! The Error is: Server Error in '/' Application....
1
by: chonthy | last post by:
Hello! I'm in trouble with the ASP.NET and OLEDB.JET connector. When I put the data into an XLS file from a dataset of my webpage, everything's OK, but in the destination file there is an...
1
by: ErikJL | last post by:
I have a simple webservice that performs a SELECT query against a database, and then an INSERT statement on the same database/table. The problem arises at the time when we create the second OleDB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...
0
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
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,...

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.