Error message: Can't lock file

Results 1 to 2 of 2

Thread: Error message: Can't lock file

  1. #1
    Join Date
    Dec 1969

    Default Error message: Can't lock file

    I&#039m trying to update a record, but it would work, anyone knows what is a &#039lock&#039? How do I deal with it ? <BR><BR>Error message:<BR>====================================== ========<BR>Microsoft JET Database Engine error &#039 80004005&#039 <BR><BR>Could not lock file. <BR><BR>/es_template_Local/inc/, line 16 <BR><BR><BR><BR>The code in is:<BR>=========================================== ===<BR>&#060;%<BR>dim oConn<BR>dim oRS<BR>dim queryESPackage<BR>set oConn= server.CreateObject("ADODB.connection")<BR>set oRS = Server.CreateObject("ADODB.recordset")<BR>queryESP ackage = Request.QueryString("esPackage")<BR><BR>&#039 Declare DO variables<BR>Dim adOpenDynamic<BR>Dim adLockPessimistic<BR><BR>&#039via native provider of OLEDB. For office2000 installed, use OLEDB.4.0, else use 3.51<BR>oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:WINNTProfileschenzr.000Personalesdata.mdb ;Mode=Read&#124Write&#124Share Deny None;Persist Security Info=False"<BR><BR><BR>dim table<BR>table = Request.QueryString("table")<BR>oRS.Open "SELECT * FROM " & table & " WHERE esPackage = &#039" & queryESPackage & "&#039", oConn<BR>oRS.MoveFirst<BR>%&#062;<BR><BR><BR><BR>D oes anyone run into similar problem? Thanks!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Error message: Can't lock file

    When you use the JET engine to connect to an Access database it creates .lbd file which describes what locks are in use (you often need to lock a DB to prevent collisions, dirty reads etc). The problem is probably occuring because the user account IIS is impersonating (IUSR_machinename by default if you&#039re not using authentication) doesn&#039t have sufficient NTFS priviledges to create the lock file. Check the permissions on the folder where the .mdb file resides.<BR><BR>Dunc

Posting Permissions

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