Deploying with a MDB file

  • Thread starter Thread starter John Baima
  • Start date Start date
J

John Baima

I have a small website that uses one MDB (Access) database. The
program works fine on my development machine, but it crashes when I
try to deploy it.

I'm getting the error message:

"The Microsoft Jet database engine cannot open the file
'C:\WebDb\vocab.mdb'. It is already opened exclusively by another
user, or you need permission to view its data."

But that is bogus. The file exists (I get a different message if the
file is not there). The file is not opened by another process, and I
have no idea why having the file in another location causes a
permission problem. The connection string is:


"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
OLEDB:Database Locking Mode=1;Data Source=""C:\WebDb\vocab.mdb"";Jet
OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet
OLEDB:System database=;Jet OLEDB:SFP=False;persist security
info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt
Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't
Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";

What am I doing wrong???

-John
John Baima
 
Hi,

you need to give permissions on your MDB file for ASP.NET process on ur deployment machine.

Rajeev
 
Rajeev Soni said:
Hi,

you need to give permissions on your MDB file for ASP.NET process on ur deployment machine.

Rajeev

How is this done? I don't remember doing anything special on my
development machine. The deployment machine is Win Server 2000.

-John
 
Hi,

well i exactly dont know to which user of "ASP.NET process u need to give permission" when i encountered this problem i just selected the MDB file and gave full control permission on it to "Everyone".

To set the permission just select the MDB file right click on it and go to securities tab and if you u dont find "Everyone" there just add and it give full permissions to it.

Rajeev.
 
¤ I have a small website that uses one MDB (Access) database. The
¤ program works fine on my development machine, but it crashes when I
¤ try to deploy it.
¤
¤ I'm getting the error message:
¤
¤ "The Microsoft Jet database engine cannot open the file
¤ 'C:\WebDb\vocab.mdb'. It is already opened exclusively by another
¤ user, or you need permission to view its data."
¤
¤ But that is bogus. The file exists (I get a different message if the
¤ file is not there). The file is not opened by another process, and I
¤ have no idea why having the file in another location causes a
¤ permission problem. The connection string is:
¤
¤
¤ "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
¤ OLEDB:Database Locking Mode=1;Data Source=""C:\WebDb\vocab.mdb"";Jet
¤ OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet
¤ OLEDB:System database=;Jet OLEDB:SFP=False;persist security
¤ info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt
¤ Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't
¤ Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica
¤ Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";

See the following:

PRB: Cannot Connect to Access Database from ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316675

INFO: Permissions to Connect to a Remote Access Database from ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307901


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top