Results 1 to 7 of 7
  1. #1
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291

    Run-time error '3734': database is locked ...

    Where I highlighted in red it is stopping and giving me Run-time error '3734':


    The database has been placed in a state by user 'Admin' on machine 'blah' that prevents it from being opened or locked.

    How do I make it so I can get into the current database? Is there a setting, I am using access 2010 at the moment.

    Code:
    If MsgBox("Do you want to update the selected file with Drop Inlet data?", vbOKCancel) = vbOK Then
                
                Dim dbGIS As DAO.Database
                Dim rstGIS As DAO.Recordset
                
                Dim fldID_NAME As DAO.Field
                Dim fldRIM_ELEV As DAO.Field
                Dim fldDICOL As DAO.Field
                Dim fldDIGL As DAO.Field
                Dim fldDIGE As DAO.Field
                Dim fldDID As DAO.Field
                
                
                Set dbGIS = OpenDatabase(strInputFileName)
                Set rstGIS = dbGIS.OpenRecordset("Storm_Net_Junctions")
                Set fldID_NAME = rstGIS.Fields(19)
                Set fldRIM_ELEV = rstGIS.Fields(12)
                Set fldDICOL = rstGIS.Fields(15)
                Set fldDIGL = rstGIS.Fields(16)
                Set fldDIGE = rstGIS.Fields(17)
                Set fldDID = rstGIS.Fields(18)
                
                Dim cdb As DAO.Database
                Dim crst As DAO.Recordset
                
                Set cdb = CurrentDb()
                Set crst = cdb.OpenRecordset("InspectionsDI")
            
            
    '            MsgBox "test"
                crst.MoveFirst
                rstGIS.MoveFirst
                
                Do While Not rstGIS.EOF
                    Do While Not crst.EOF
                        If fldID_NAME = crst![Manhole Number (12)] Then
                            MsgBox crst![Manhole Number (12)]
                            Exit Do
                        End If
                        crst.MoveNext
                    Loop
                    rstGIS.MoveNext
                Loop
                
            End If

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is this thread Solved? If so, will you post your solution so others may benefit?

  3. #3
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    I shut down the database and opened it back up and it worked, so I am not sure why that fixed it. It has happened again and I just shut it down again and it fixed it. I think when I edit the table then try to run the program it has a conflict with it but I am not sure on that.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are opening the table directly and editing the data and then closing the table and running the code? You could be correct there although I've not experienced that myself and I do that on occasion. Is this line:
    Set dbGIS = OpenDatabase(strInputFileName)
    ...opening the same Database you are in? That might cause a problem.

  5. #5
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    Yes when I observed the error occurring was when I had opened the table then closed it and tried to run code that would try to reopen that table to access its recordset. I dont understand why after I have closed the table it wont let me reopen it using DAO object but that appears to be the situation.

    Set dbGIS = OpenDatabase(strInputFileName) is not opening the file I am in but
    Set cdb = CurrentDb() does, and that is the particular line where the error occurs.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Was the table you edited a linked table in another db or is it in the CurrentDB?

  7. #7
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291
    I never thought of that but the table is a linked table in a database which I did not open but had to be accessed when I opened the recordset. Good catch.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Run time error
    By vaikz in forum Import/Export Data
    Replies: 1
    Last Post: 02-18-2010, 11:37 PM
  2. Replies: 1
    Last Post: 02-12-2010, 01:45 AM
  3. Run time error '6': Overflow
    By wasim_sono in forum Access
    Replies: 0
    Last Post: 06-22-2007, 06:44 AM
  4. Run Time Error 424
    By ddog171 in forum Programming
    Replies: 3
    Last Post: 02-04-2006, 07:13 AM
  5. Replies: 1
    Last Post: 12-09-2005, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums