Results 1 to 10 of 10

Thread: Help ASAP Need this Error Fixed!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432

    Help ASAP Need this Error Fixed!

    why am i getting this error and how can i fix it ?
    Code:
    Server Error in '/ClaytorsCottages' Application.
    --------------------------------------------------------------------------------
    
    The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\ClaytorsCottages\bin\ClaytorsCottagesAccess.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 'C:\Inetpub\wwwroot\ClaytorsCottages\bin\ClaytorsCottagesAccess.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
    
    Source Error: 
    
    
    Line 123:    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Line 124:        'Put user code to initialize the page here
    Line 125:        daGuest.Fill(dsGuest)
    Line 126:    End Sub
    Line 127:
     
    
    Source File: c:\inetpub\wwwroot\ClaytorsCottages\Guest.aspx.vb    Line: 125 
    
    Stack Trace: 
    
    
    [OleDbException (0x80004005): The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\ClaytorsCottages\bin\ClaytorsCottagesAccess.mdb'.  It is already opened exclusively by another user, or you need permission to view its data.]
       System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
       System.Data.OleDb.OleDbConnection.InitializeProvider()
       System.Data.OleDb.OleDbConnection.Open()
       System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
       System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
       ClaytorsCottages.Guest.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ClaytorsCottages\Guest.aspx.vb:125
       System.Web.UI.Control.OnLoad(EventArgs e)
       System.Web.UI.Control.LoadRecursive()
       System.Web.UI.Page.ProcessRequestMain()
    
     
    
    
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0

  2. #2
    Lively Member
    Join Date
    Mar 2002
    Posts
    96
    did you load .net framework before IIS or after?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    befor

    My pages run fine just when i added Database support it get that error ?

  4. #4
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    Well the error message is saying you have the database open exlusively. If you have it open in access then instead open access and browse to the db and open it without selecting to open it exclusively. Then you can have it open in access and test the webpage.

  5. #5
    Addicted Member Sheppe's Avatar
    Join Date
    Sep 2002
    Location
    Kelowna, BC
    Posts
    245
    Access DB's can only have one connection at a time and thus are unrealistic for a web application. Try setting up your DB in SQL Server, or SQL Desktop Ed..
    [vbcode]
    On Error Goto Hell
    [/vbcode]
    Sheppe Pharis, MCSD
    Check out http://www.vb-faq.com
    Click here for access to the free Code-Express source code and component sharing network for VB6
    Want a better way to skin your .NET applications? Click here!

  6. #6
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    Originally posted by Sheppe
    Access DB's can only have one connection at a time and thus are unrealistic for a web application. Try setting up your DB in SQL Server, or SQL Desktop Ed..
    This is incorrect. Access can be shared by many users as long as none of them has it open exclusively which is an option when you browse in access and open the mdb.
    Unfortunately access remembers if you had it open exclusively and if you open it from the recent list it open exclusively again so you need to explicitly browse for it and ensure you are not selecting exclusive when opening it.
    Apart from that I have designed several applications in the past being used by several users on a network.

  7. #7
    Addicted Member Sheppe's Avatar
    Join Date
    Sep 2002
    Location
    Kelowna, BC
    Posts
    245
    Originally posted by Musician
    This is incorrect. Access can be shared by many users as long as none of them has it open exclusively which is an option when you browse in access and open the mdb.
    Unfortunately access remembers if you had it open exclusively and if you open it from the recent list it open exclusively again so you need to explicitly browse for it and ensure you are not selecting exclusive when opening it.
    Apart from that I have designed several applications in the past being used by several users on a network.
    Curious. Do you have the code to open it without exclusive access?
    [vbcode]
    On Error Goto Hell
    [/vbcode]
    Sheppe Pharis, MCSD
    Check out http://www.vb-faq.com
    Click here for access to the free Code-Express source code and component sharing network for VB6
    Want a better way to skin your .NET applications? Click here!

  8. #8
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    I could be wrong but accessing an mdb through code will be default be for sharing in .net. I have only done access systems in vb6 with ado and I did it the standard way which allows several users to use my system at once. No special code involved.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    USA
    Posts
    432
    OK gues that all was a bunch of Mubo Jumbo can some one give me a solution to my problem i dont have the file open in Access and i dont know what do doo Help ?

  10. #10
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Try moving the access database out of your web directory. The web directory has permissions on it so you cannot write data, so try moving the database to somewhere on the local C: drive.

    I have found a lot of issues using Access with ASP.NET and moving the DB to a new location helps a lot.

    Hope this helps,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width