By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

OleDB Connect string to remote Data

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.