Connecting Tech Pros Worldwide Forums | Help | Site Map

System.Data.OleDb.OleDbException

Newbie
 
Join Date: Aug 2006
Posts: 1
#1: Aug 2 '06
System.Data.OleDb.OleDbException

--------------------------------------------------------------------------------

Hi All,I am getting problem while accessing the MSAccess database.The error I got is System.Data.OleDb.OleDbException.The micosoft Jet database engine can't open the database.Its alrerady opened exclusively by another user,or u need permissions to view its data.but no body is opened the database.how to solve this problem???I am writing the code which I am written below.Thanks in advance. I am written this code in web service application created in vc.Net. the database in the same system in which webservice is running.Its windows 2003 server.

OleDbConnection* con=new OleDbConnection();
con->ConnectionString=
S"Provider=Microsoft.JET.OLEDB.4.0;"S"Data Source=
C:\\test.mdb;";
con->Open();
OleDbCommand* cmd=new OleDbCommand(S"update Details set Printed='yes' where NO='ab1234'",con);
cmd->ExecuteNonQuery();
con->Close();

Member
 
Join Date: Jul 2006
Location: Perth, Western Australia
Posts: 38
#2: Aug 3 '06

re: System.Data.OleDb.OleDbException


Browse to the database file (mdb). Right click the file and go to properties. Then click the security tab, and make sure the localhost\ASPNET account has the neccessary permissions.
Reply