Can't Open OleDb Connection to Access Database

  • Thread starter Thread starter David
  • Start date Start date
D

David

I'm trying to open an OleDb connection to an Access .mdb file to fill a
datareader and display the records in a datagrid on a web form (using Visual
Studio .NET). It all works great when the .mdb file is local, but when I try
to connect to an .mdb file on a network share, the web page displays, "The
Microsoft Jet database engine cannot open the file
'\\CoSvr2\backends$\Base.mdb'. It is already opened exclusively by another
user, or you need permission to view its data." But the file isn't open and
granting full control permissions on the share to everyone doesn't work. Any
help would be greatly appreciated!
David
 
When setting the data source in the connection string, you must put a full
physical path to the Access db. Indicating a server share is not
acceptable.
 
I believe server share should work fine. At least it worked fine before. You
just need to follow next pattern when you specify share

\\ServerName\ShareName\PatToDb\MyDb.mdb

--
Val Mazur
Microsoft MVP

http://xport.mvps.org
 
Are you sure about this? I don't think that is correct. With Access, you
must specify the full physical path.
 
¤ Are you sure about this? I don't think that is correct. With Access, you
¤ must specify the full physical path.
¤

No, a UNC path will work just fine.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
¤ I'm trying to open an OleDb connection to an Access .mdb file to fill a
¤ datareader and display the records in a datagrid on a web form (using Visual
¤ Studio .NET). It all works great when the .mdb file is local, but when I try
¤ to connect to an .mdb file on a network share, the web page displays, "The
¤ Microsoft Jet database engine cannot open the file
¤ '\\CoSvr2\backends$\Base.mdb'. It is already opened exclusively by another
¤ user, or you need permission to view its data." But the file isn't open and
¤ granting full control permissions on the share to everyone doesn't work. Any
¤ help would be greatly appreciated!
¤ David
¤

Val has part of your answer. The only problem is that you're attempting to access the file on a
remote resource which will also require authentication delegation from an ASP.NET application. See
if the following helps:

http://msdn.microsoft.com/library/d...y/en-us/vsent7/html/vxconaspnetdelegation.asp


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Val,
Thanks very much for the helpful link. I've tried the MS resolution
(workaround):
Grant read and write permissions for the "Everyone" group on the database
and the database folder.
....but problem still occurrs. I'll look into the other two workarounds.
David
 
Back
Top