473,657 Members | 2,566 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.ActiveConne ction = CurrentProject. Connection
cat.Tables.Refr esh

cat.Tables.Dele te "tbltempTDW "

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

Thanks in advance.

Uttam
Nov 12 '05 #1
2 2802
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(Q Name) Then DoCmd.Close acQuery, QName
DoCmd.DeleteObj ect 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.ne t> wrote in message
news:8a******** *************** ***@posting.goo gle.com...
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.ActiveConne ction = CurrentProject. Connection
cat.Tables.Refr esh

cat.Tables.Dele te "tbltempTDW "

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

Thanks in advance.

Uttam

Nov 12 '05 #2
hello Phil,

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

Thanks

Uttam

==========
"Phil Stanton" <ph**@stantonfa mily.co.uk> wrote in message news:<3f******* *************** *@mercury.nildr am.net>...
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(Q Name) Then DoCmd.Close acQuery, QName
DoCmd.DeleteObj ect 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.ne t> wrote in message
news:8a******** *************** ***@posting.goo gle.com...
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.ActiveConne ction = CurrentProject. Connection
cat.Tables.Refr esh

cat.Tables.Dele te "tbltempTDW "

the error message is displayed when I try to execute the
cat.Tables.Dele te "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
14831
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 scsi disks installed on the db box. Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to be using it all.
17
1945
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 gallery. My DB is configured like this... tbl_pictures this contains all pictures in the picture gallery. tbl_pictures_galleries
8
5463
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 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
0
8752
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 for a Crystal Report. The method has a single argument which represents a parameter required by the Stored Procedure. When I generate the report in Crystal and run it using the class I built, it works fine. I've tried it with parameters and...
3
3786
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 why is the bloody thing doing this. The paths have been checked and are correct. The crystal Report is a .rpt file. Not one created in the VS.net IDE but in crystal itself.
7
4416
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 the rest. When I start my application and, from it, try to open up a report I get an exception "Query engine error: C:\WINDOWS\Temp\temp_*******.rpt" with some wierd numbers instead of *******. Can anyone tell me what the problem is here and how to...
3
2433
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 object :(((( Anyone pls help me to solve this problem!!! thanks in advance,
32
12505
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 Set wsName = DBEngine.Workspaces(0) Set dbName = wsName.OpenDatabase(CurrentProject.FullName) Set rsName = dbName.OpenRecordset("SQL Statement")
0
5557
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 ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2731
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 we have to send another system
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.