none
Accessing MS ACCESS database through ASP.NET – VS 2003 - error message ms jet database engine cannot open RRS feed

  • Question

  •  

    Dear sir,

     

                            Accessing MS ACCESS database through ASP.NET – VS 2003

     

    My machine OS is WIN XP service pack 2

     

    I want open the database and copy some records from MS Access database. The MS ACCESS  file (mdb) file is in another machine.  If I work with local system mdb file then it is working fine.  If I try to open the file from network the following error message is appearing.

     

    The Microsoft Jet database engine cannot open the file '\\cogento\PLAT04S\Acu301.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file '\\cogento\PLAT04S\Acu301.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

    Source Error:

    Line 192:        Dim mdbcon As New OleDb.OleDbConnection(dsnmdb)
    Line 193:        Dim mdbcmd As New OleDb.OleDbCommand(mdbsql, mdbcon)
    Line 194:        mdbcon.Open()
    Line 195:        Dim r As OleDb.OleDbDataReader = mdbcmd.ExecuteReader
    Line 196:        Dim x As Integer = 0


    Source File: c:\inetpub\wwwroot\payroll system\attendance_update.aspx.vb    Line: 194


    My coding is (while using the below command, the above error message is appearing.)

     

            dsnmdb = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\cogento\PLAT04S\Acu301.mdb"

     

     

     

    if I try with below coding then no problem in output.

     

    dsnmdb = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\keico\slpb\Acu301.mdb"

     

    Kindly check and how to rectify the same.

     

    Regards

     

    v. annadurai

    Wednesday, September 26, 2007 11:30 AM

All replies

  •  

     

    Dear sir,

     

                My ASP.NET program is running in WIN XP OS. I want access MS access database(MDB)  from WINDOWS 2000 Professional OS machine, which all are under in same domain.

                    While running my ASP.net programming, the below error is appearing. If I try to access from WIN98, then there is no problem.

     

    Kindly check and do the needful.

     

    Regards

     

    V. Annadurai

     

     

    Dear sir,

     

                            Accessing MS ACCESS database through ASP.NET – VS 2003

     

    My machine OS is WIN XP service pack 2

     

    I want open the database and copy some records from MS Access database. The MS ACCESS  file (mdb) file is in another machine.  If I work with local system mdb file then it is working fine.  If I try to open the file from network the following error message is appearing.

     

    The Microsoft Jet database engine cannot open the file '\\cogento\PLAT04S\Acu301.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file '\\cogento\PLAT04S\Acu301.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

    Source Error:

    Line 192:        Dim mdbcon As New OleDb.OleDbConnection(dsnmdb)
    Line 193:        Dim mdbcmd As New OleDb.OleDbCommand(mdbsql, mdbcon)
    Line 194:        mdbcon.Open()
    Line 195:        Dim r As OleDb.OleDbDataReader = mdbcmd.ExecuteReader
    Line 196:        Dim x As Integer = 0


    Source File: c:\inetpub\wwwroot\payroll system\attendance_update.aspx.vb    Line: 194


    My coding is (while using the below command, the above error message is appearing.)

     

            dsnmdb = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\cogento\PLAT04S\Acu301.mdb"

     

     

     

    if I try with below coding then no problem in output.

     

    dsnmdb = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\keico\slpb\Acu301.mdb"

     

    Kindly check and how to rectify the same.

     

    Regards

     

    v. annadurai

    Thursday, September 27, 2007 7:06 AM
  • The account under which the web application is running must have full permissions to the folder where the database is located. If your ASP.NET application is not configured to use impersonation then this would be the local ASPNET account on the machine where the web application is running.

     

    Friday, September 28, 2007 5:23 PM