?
Solved

Access 2010 Error 3024

Posted on 2011-05-02
8
Medium Priority
?
996 Views
Last Modified: 2012-05-11
I am using an ACCDB Access 2010 database linked to SQL Server tables.  I have used “DoCmd.RunSQL” in many places to do updates with no problems but today I added another and this one always generates an error message saying “Error 3024 Could not find the file 'I:\...\dbo.mdb'.  After complaining it goes ahead and does the update anyway!?  The SQL string is “Update dbo.tbl_PO_PurchaseOrders Set Completed = -1 Where (PONumber = '0100-009001')” – the PO number is a variable. Needless to say “dbo.mdb” is not the name of the database – the name is wrong and the extension is ACCDB not MDB.  I found references on the web to the fact that this has something to do with it being an ACCDB not MDB database type.  Apparently the MDB uses DAO and the other uses ADO?
I can “solve” the problem using  “If Err.Number = 3024 Then Err.Clear  Resume Exit_Handler” - but why has the same code been working fine for 6 months and now it starts complaining – and then goes ahead and doing the update anyway?  I also tried making an ADODB connection with a connection string and using “conAccess.Execute SQL_Statement” and this complains about “You do not have exclusive access to the database at this time – if you proceed you may not be able to save changes” although it too does the update anyway.
Is there any way to get this to work consistently?
Thanks
0
Comment
Question by:thresholds
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 21
ID: 35508131
What is the SQL you are attempting to run?
0
 
LVL 85
ID: 35508286
I'd advise you to make a backup of your database and then perform some maintenance. In 2010, you can Compact the database (click the File tab, and then the Compact button).

If that doesn't work, you might try building a new, blank database and importing everything into that new database.
0
 

Author Comment

by:thresholds
ID: 35511733
As mentioned in my original post the SQL I'm running is “Update dbo.tbl_PO_PurchaseOrders Set Completed = -1 Where (PONumber = '0100-009001')” with the actual PONumber being a variable – the SQL string is put together using VBA.  I know the SQL strings are put together correctly since I test them by using Debug.Print and then running the resulting SQL in the SQL server management studio (v 2008).  Plus, as I mentioned, the code actually does the update – it just keeps complaining about it.
I have already made new databases and copied the old objects to the new one (doing a decompile first) and sometimes even deleting all of the code modules and then bringing in the old objects into a new database, adding the code back and proceeding from there.  This has worked (apparently) to solve some ODBC issues.  I have lost count of the number of times I have done a compact and repair.
I’ll try making a new DB again but it sure seems to me that this stuff (Access DBs) is hyper sensitive and gets corrupted faster than a Chicago politician in heat.
Thanks
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35515082
It might be just a network timing issue.
...or a function of the number of times the networks "Tries" to reach the destination.

In Access you can play around with the Client settings, and see if that helps:



untitled.JPG
0
 

Accepted Solution

by:
thresholds earned 0 total points
ID: 35516384
I'll give it a try - right now I am making a new DB and importing all objects.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35516435
ok
0
 
LVL 85
ID: 35873261
It would seem my comment resolved your issue - i.e. build a new database and import everything to it. If you're looking for ways to stop constant corruption, then you should include that in your original post.

As to stopping corruption - there are quite a few things that cause corruption. One is networking issues, as HTC suggests. Access requires a robust and healthy (and FAST) network. Using wireless, VPN, WAN etc etc networks is a recipe for disaster in most cases.

Another big cause is "sharing" the same Access database among multiple users, especially if those users are running different versions of Access. In your case, you should deploy a COPY of the database to each user, and each user should run their copy from their local machine.



0
 

Author Closing Comment

by:thresholds
ID: 35884862
Another corrupted database.  Again.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question