System.Data.OleDb.OleDbException

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vivek g
    New Member
    • Aug 2006
    • 1

    System.Data.OleDb.OleDbException

    System.Data.Ole Db.OleDbExcepti on

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

    Hi All,I am getting problem while accessing the MSAccess database.The error I got is System.Data.Ole Db.OleDbExcepti on.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->ConnectionStri ng=
    S"Provider=Micr osoft.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'",co n);
    cmd->ExecuteNonQuer y();
    con->Close();
  • Enyi
    New Member
    • Jul 2006
    • 38

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

    Comment

    Working...