Trouble with this piece of code

Results 1 to 2 of 2

Thread: Trouble with this piece of code

  1. #1
    Ben Verwey Guest

    Default Trouble with this piece of code

    *I am having trouble with this piece of code...<BR><BR>Dim objConn<BR><BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR> <BR>objConn.ConnectionString ="PROVIDER=MSDASQL;" & _<BR> "DRIVER={Microsoft Access Driver (*.mdb)};" & _<BR> "DBQ=//EDM_NT_LOTUS1/WEB/PortalData.mdb;" <BR><BR><BR><BR>*This is the error message that I get....<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database engine cannot open the file &#039(unknown)&#039. It is already opened exclusively by another user, or you need permission to view its data. <BR><BR>/portal.asp, line 29 <BR><BR>I know that the database is not open, because so far, I am the only one that is using it, and the users don&#039t have access to it. <BR><BR>Can anyone help me?

  2. #2
    Markkk Guest

    Default RE: Trouble with this piece of code

    First, make sure that no other users are logged into the Access database are are using it. You may want to open the locking file (*.ldb) with notpad to see who is actively using the database. Chances are it will be "admin".<BR><BR>I have had similar problems. Usually, the locking file (*.ldb) somehow gets corrupted and prevents IIS from opening the database. In such cases, you must try to manually delete the locking file. Many times, you&#039ll find that you can not delete the locking file or even take ownership of the file. When this occurs, you must do a system rebootto clear (delete) the corrupted locking file. <BR><BR>Why the locking file gets corrupted is unknown to me.....I guess it is just one of the downfalls of using Access in a web environment. It is far better to use an enterprise database like SQL Server, Oracle, etc. in large volume or traffic web apps.<BR><BR>I hop 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