Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Query???

Status
Not open for further replies.

mistereli

Technical User
Jan 13, 2003
73
0
0
US
Can anyone help me with this problem? This is what I've done:

1. I have a list of serial numbers in a seperate table.

2. I created a delete query using this table to delete the serial numbers in 2 seperate tables.

3. I tested it on a test copy of my database (on my laptop) and I run the delete query twice for each table and it runs perfectly and quickly. My list of serial numbers is 500 unique numbers. It deletes the 500 records out of my first table and 2500 out of my second table.

4. My problem is - when I import my delete query and table of serial numbers to the main database file on the network and run it, it 1.) takes 45 minutes to run (verses 5 seconds on my laptop) and I get a messages that says that 'your about to delete 500 rows from the specific table, once you click yes you can't use the undo command to reverse the changes'. When I click 'yes' another message comes back and says 'MS Access can't delete 0 records in the delete query due to key violations and 250 records due to lock violations. Do you want to run this action query anyways? To ignore the errors and run the query, click yes.'

5. I click yes and only 250 records are deleted. By the way, this database is replicated.

6. Why is it that I can run it when it is not on the network, without any problems. I have access rights.

7. Do you think that if I run the delete query on one of the laptop copies and synchronize it with the network copy that it would allow it?

I appreciate anyones help and expertise in this matter. Thank You, Kim
 
To take care of your message box problem read this

FAQ702-4855

As far as the speed goes it could be any number of things.

What type of connection do you have? The query is trying to execute over your connection which will greatly slow time processing time. If you had a remote connection that would help some.
 
That doesn't solve my problem of the delete query processing and deleting all 500 records. Half of them are deleted and the other half are under a lock violation. Thanks, Kim
 
Is your test database exactly like your main one? (tables/relationships/etc) If not it could be that your serial number is hooked in with another table and needs to be deleted there first.

Are there any other users on the database? If yes can you ask them to get off.
As far as time, well I have queries with the same issue- quick on my test/local db and take alot of time on the network.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top