I have an Access 2000 MDB File that has grown to 1.99 GB in size. Every time I try and run a query I get an error If I try to compact and repair I get an error. The error is Invalid Argument. How do I fix this?
Make sure to make a backup before trying to compact it thou, just in case.
Also you could take an older backup (assuming you have one) compact that, then delete all of the records from all of the table, compact again, then copy the good records from the current large table into the empty one.
Can we assume that there are significant deleted records in the MDB, or what else is there that makes you think that compacting it will reduce the size? Or is this access database really that full of good information, e.g. have you push access to it limits?
Lion Crest Software Services
Anthony L. Testi
President
first no the Database is not split. It was functioning fine until this month. It was at about 200 MB the procedure calls for a staging table that is recreated each month for a Report that is a rolling 13 months. So if the report is run in Jan 2011 the table is overwritten with data from Jan 2010 through Jan 2011. The required data is membership so if the person is a member on the first of the month they are a member for the entire month.
What I think happened is in December we had a special request that the report be run for each year from 2000 through 2010 and the data for the entire 10 years was run. The reports for each year ran successfully but the DB grew to 2 GB. I deleted the table that was created and tried the compact and repair but it errored and the size still shows as 2 GB. I'm going to try and split the DB and see what happens. I'll let you know
To rehash based on everyones tips.
1)if you have not copied it yet do so, quick.
2)Create a 3 brand new databases. They will contain the following
Front end: all forms, reports, queries, macros, modules
Back end 1: all data tables
Back end 2: the "staging table" structure only no data. This is likely corrupt so I would make a new one if I cannot copy the structure.
3)Import your data tables into backend 1 (not the generated one)
4)compact and repair
5)Import all other objects into the front end: forms, reports, queries, macros, modules
6)compact and repair again
7)copy and paste if possible the staging table "structure only" or create from scratch a new staging table. This will go in back end 2
8)Link to both back ends. Just like linking to a single back end just not done as often
This way if the staging table gets corrupted in the future, it will not impact your front end or data back end.
One of the 'Tricks' I have been doing is having a seperate Master Report MDB that holds the just structure of the report data in it. At program start up I make a copy of that master and then all reports are run via that daily copy. In a way it is a hand compacting of report information. Does not help for your immediate issue but something to think about in the future.
Lion Crest Software Services
Anthony L. Testi
President
I would split the Database, but to get you working right now, try this.
1) Create a brand new blank Database
2) Open up the 'Import' option and select all of the DB elements from your old DB.
3) If the Import works, then you should have a new, good copy.
If the import fails, then look at where the import stopped, an identify the object that failed to import.
Now, repeat the 3 steps above, select all objects except the one that failed and see if that works
Already done. I created a new DB and imported all exept the temp table I thought was causing the issue. Worked perfectly. ReCreated the temp table with the correct amount of data the MDB is back to the 200 MB it was originally. thank you everyone for your suggestions. I have now made it a policy that the MDB File be compacted on the last day of every month so that when the next temp table is created on the 5th of the month it won't repeat the same error. Fortunately the process that caused the problem in the first place was a 1 time only process and won't be repeated.
Honestly I wish I could. I've tried pointing out the advantages but with rare exception I'm not permitted to do that. Very frustrating to work here. Anybody knows of a database developer (Report Writer) position in Southern Cal be sure to let me know.
I know. 80% of the MDB's I've put into production here have been trashed at one time or another. I've pointed out why they were trashed and was told I should've accounted for that possibility. I pointed out that I did and the recommendations I made. Was told that those recommendations were unnecessary as this is the way they've been doing these for years and not the cause of the crash my faulty programming was the cause. I've come to the conclusion that I need to get out of here ASAP. I'm still trying to figure out why if I'm so bad do I still have a job.
I need to point out that here I am not in IT and the people I work with are not IT people. They are essentially users. I need to get back to an IT job.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.