database access problem

Results 1 to 3 of 3

Thread: database access problem

  1. #1
    Join Date
    Dec 1969

    Default database access problem

    I am using access databases and have been having problems consitantly accessing them. I posted about this a few other times and was told to use the Jet driver to access the db&#039;s because it was less buggy. I am doing this now and it did work to a degree but it is still buggy and results in problems every once in a while. Like now I am getting the error:<BR><BR>Error Type:<BR>Microsoft JET Database Engine (0x80004005)<BR>The Microsoft Jet database engine cannot open the file &#039;C:
    ew_engineeringdbFiles.mdb&#039;. It is already opened exclusively by another user, or you need permission to view its data.<BR>C:NEW_ENGINEERINGADMIN../library/openFDB.asp, line 5<BR><BR>I am opening the connection with the following code:<BR><BR>Dim Fconn<BR>Set Fconn = Server.CreateObject("ADODB.Connection")<BR>Fconn.O pen "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../db/files.mdb")<BR><BR>The only method I have found that seems to fix this problem is to make a copy of the database, delete the old one and replace it with the copy. This is a pretty bad sollution in my problem because while it&#039;s easy enough when all I have is a test database once the system gets functioning the db is going to become significantly larger, and access to it will not be as simple because it will be on a server somewhere rather than my local machine. I also have no idea what is causing this problem. I think it may have something to do with Access not releasing a lock on the file but even a restart does not fix the problem and I did not think that kind of a lock would survive a restart. Any ideas what in the world is going on?

  2. #2
    Join Date
    Dec 1969

    Default Do you have your database set

    to shared mode as opposed to exclusive mode? Do you know where to check for this?

  3. #3
    Join Date
    Dec 1969

    Default I've not had this problem myself...

    ...but something similar. I found that it was due to my code not closing the database connection properly, or a page, that opens a connection, crashing (or rather not executing fully) or timing out.<BR><BR>If it happens often, then check your code to make sure that you close every connection that you open.<BR><BR>If it doesn&#039;t happen often, then it may be a page crashing that causes it. Not sure what to do about it, other than double-check all relevant pages to see whether they are likely to crash or time out.<BR><BR>Oliver.

Posting Permissions

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