473,241 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 software developers and data experts.

Help required to unravel databases engine related Error Message

Hello,

In my application, I need to create temporary files, use them as
sources for queries which in turn populate forms. When a button is
clicked, I need to delete these temporary files, re-generate the
queries and refresh the forms.

I am encountering the following error which I am unable to unravel:

"The database engine could not lock table tbltempTDW because it is
already in use by another person or process."

Could someone guide me where to look for as to who or what process is
locking this up? I am somewhat familiar with the use of the debugger.

For some more info on how the table is created:

I use the following syntax for initial deletion of any old file with
the same name

Dim cat As ADOX.Catalog
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
cat.Tables.Refresh

cat.Tables.Delete "tbltempTDW"

the error message is displayed when I try to execute the
cat.Tables.Delete "tbltemTDW" statement.

Thanks in advance.

Uttam
Nov 12 '05 #1
2 2785
I use a function similar to this

Function DeleteTempQuery(QName As String) As Boolean

Dim MyDb As Database
Dim i As Integer

Set MyDb = CurrentDb
For i = 0 To MyDb.QueryDefs.Count - 1
If MyDb.QueryDefs(i).Name = QName Then ' Delete the Temp
Query
If IsQueryLoaded(QName) Then DoCmd.Close acQuery, QName
DoCmd.DeleteObject acQuery, MyDb.QueryDefs(i).Name
DeleteTempQuery = True
MyDb.Close
Set MyDb = Nothing
Exit Function
End If
Next i
DeleteTempQuery = False
MyDb.Close
Set MyDb = Nothing

End Function

Don't know if this is any help, but it's simple (Has to be for me)
Phil
"Uttam" <u0***@usa.net> wrote in message
news:8a**************************@posting.google.c om...
Hello,

In my application, I need to create temporary files, use them as
sources for queries which in turn populate forms. When a button is
clicked, I need to delete these temporary files, re-generate the
queries and refresh the forms.

I am encountering the following error which I am unable to unravel:

"The database engine could not lock table tbltempTDW because it is
already in use by another person or process."

Could someone guide me where to look for as to who or what process is
locking this up? I am somewhat familiar with the use of the debugger.

For some more info on how the table is created:

I use the following syntax for initial deletion of any old file with
the same name

Dim cat As ADOX.Catalog
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
cat.Tables.Refresh

cat.Tables.Delete "tbltempTDW"

the error message is displayed when I try to execute the
cat.Tables.Delete "tbltemTDW" statement.

Thanks in advance.

Uttam

Nov 12 '05 #2
hello Phil,

Could you please post the function "IsQueryLoaded" also? I get an
error for the function.

Thanks

Uttam

==========
"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message news:<3f***********************@mercury.nildram.ne t>...
I use a function similar to this

Function DeleteTempQuery(QName As String) As Boolean

Dim MyDb As Database
Dim i As Integer

Set MyDb = CurrentDb
For i = 0 To MyDb.QueryDefs.Count - 1
If MyDb.QueryDefs(i).Name = QName Then ' Delete the Temp
Query
If IsQueryLoaded(QName) Then DoCmd.Close acQuery, QName
DoCmd.DeleteObject acQuery, MyDb.QueryDefs(i).Name
DeleteTempQuery = True
MyDb.Close
Set MyDb = Nothing
Exit Function
End If
Next i
DeleteTempQuery = False
MyDb.Close
Set MyDb = Nothing

End Function

Don't know if this is any help, but it's simple (Has to be for me)
Phil
"Uttam" <u0***@usa.net> wrote in message
news:8a**************************@posting.google.c om...
Hello,

In my application, I need to create temporary files, use them as
sources for queries which in turn populate forms. When a button is
clicked, I need to delete these temporary files, re-generate the
queries and refresh the forms.

I am encountering the following error which I am unable to unravel:

"The database engine could not lock table tbltempTDW because it is
already in use by another person or process."

Could someone guide me where to look for as to who or what process is
locking this up? I am somewhat familiar with the use of the debugger.

For some more info on how the table is created:

I use the following syntax for initial deletion of any old file with
the same name

Dim cat As ADOX.Catalog
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
cat.Tables.Refresh

cat.Tables.Delete "tbltempTDW"

the error message is displayed when I try to execute the
cat.Tables.Delete "tbltemTDW" statement.

Thanks in advance.

Uttam

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Thue Tuxen Sørensen | last post by:
Hi everybody ! I´m maintaining a large intranet (approx 10000 concurrent users) running on one IIS box and one DB box with sqlserver 2000. Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2...
17
by: the other john | last post by:
This should be fairly basic but I can't think of how to do this and I'm running out of time! I am developing a picture gallery and I can't figure out how to select "one" picture from each...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
0
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource...
3
by: Deasun | last post by:
I need some help please! Crystal is driving me nuts. Heres my code so far, see below. Problem: On the .export() line it comes back with error #5 Login failed! I know the login info is good so...
7
by: John | last post by:
I am using Crystal Reports in my application I made using Visual Studio.NET. I installed my application on the client machine, with all the DLLs required(added the merge modules), the engine and...
3
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an...
32
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.