473,503 Members | 12,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2790
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
14800
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
1928
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
5451
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
8713
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
3777
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
4412
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
2421
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
12472
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
5518
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
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.