Re: OleDB Connect string to remote Data



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\config\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, asemeiks@xxxxxxxxxxxxxxx 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

.