Advertisement

04.22.2007 at 07:13PM PDT, ID: 22527041
[x]
Attachment Details

URGENT - 80004005 Error - The database engine could not lock table XXXX because it is already in use by another person or process

Asked by Dansmith131 in Windows OLE Programming, Microsoft Access Database, Active Server Pages (ASP)

Tags: lock, could, database, table, engine

People,

I need an answer on this one quickly.

I have a webiste where users upload data and it is comming back with the dredded 80004005 Error. To be spcific:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] The database engine could not lock table 'JOBS' because it is already in use by another person or process.

/_scriptuploadjobs.asp, line 56

The Script is as follows:

Dim DB_SRC_CONN
Dim rsSrc
Dim query


If (Request("run")="true") Then

      Set rsSrc = Server.CreateObject("ADODB.Recordset")
      DB_SRC_CONN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & GLOBAL_ROOT &"\database\UltraDev4.mdb"
     
      Response.Write("Making table copies. Please wait...<br>")
     
      '---- COPY jobs -----
      query = GetTableColumns( aPCColumns, "JOBS")
     
      ' Get source table
      rsSrc.ActiveConnection = DB_SRC_CONN
      rsSrc.Source = query
      rsSrc.CursorType = 0
      rsSrc.CursorLocation = 2
      rsSrc.LockType = 3
      rsSrc.Open()
     
      Call createTable(rsSrc, aPCColumns)
      rsSrc.Close
     
      Response.Write("JOBS table is copied.<br>")

Function createTable( ByRef rsOld, aColumns )
    'On Error Goto Err
    Dim intX
    Dim strTable
    Dim rsNew
            Dim cnNew
           
            Set rsNew = Server.CreateObject("ADODB.Recordset")
            Set cnNew = Server.CreateObject("ADODB.Connection")
            cnNew.Open DB_CONN
     
    'set table name
    strTable = rsOld.Fields.Item(0).Properties.Item("BASETABLENAME").Value
    intX = 0
    'deletes if table exists...comment this
    '     line if you -
    'dont want the existing table to be dele
    '     ted
    'On Error Resume Next
   
      If (Request("append") = "") Then
           
            Response.Write("Replacing Data (Not Appending!)...<br>")
           
            cnNew.Execute "Drop table [" & strTable & "]" '<------ LINE 56
            'create table
            cnNew.Execute "Create table [" & strTable & "]"
     
     
            While intX < rsOld.Fields.Count
     
     
                  With rsOld.Fields.Item(intX)
                        cnNew.Execute "Alter table " & strTable & " Add Column [" & .Name & "] " & dataType(.Type)
                        intX = intX + 1
                  End With
            Wend
      Else
            Response.Write("Appending Data...<br>")
      End If

ALL WINDOWS SECURITY SETTINGS ARE CORRECT. I have given full access to the whole directory for the Everyone group (for testing), and to the TEMP directories. Is there something I have to set in Acess to give permissions for the tables?

Is there anything else i am missing?

Regards,

DanStart Free Trial
[+][-]04.22.2007 at 07:16PM PDT, ID: 18955947

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 07:17PM PDT, ID: 18955952

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 07:19PM PDT, ID: 18955965

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 07:28PM PDT, ID: 18955984

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 07:45PM PDT, ID: 18956039

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 08:00PM PDT, ID: 18956075

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2007 at 11:06PM PDT, ID: 18956481

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 02:31AM PDT, ID: 18956999

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 02:42AM PDT, ID: 18957030

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 02:52AM PDT, ID: 18957060

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 02:53AM PDT, ID: 18957066

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 03:13AM PDT, ID: 18957140

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 03:26AM PDT, ID: 18957191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2007 at 05:04PM PDT, ID: 18962606

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2007 at 01:29AM PDT, ID: 18964029

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows OLE Programming, Microsoft Access Database, Active Server Pages (ASP)
Tags: lock, could, database, table, engine
Sign Up Now!
Solution Provided By: carl_tawn
Participating Experts: 5
Solution Grade: A
 
 
[+][-]04.26.2007 at 07:31PM PDT, ID: 18986518

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.26.2007 at 07:40PM PDT, ID: 18986533

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32