I have been experiencing some very strange symptoms over the past week or so, and am looking for ideas. I have a number of different frontends that link to one or more shared backends. A week or so ago, all the frontends were reporting that one of the backends, PCAMaster_be, was corrupt (ie, "not a recognizable database format). I repaired it, it worked ok, and then a few hours later it was corrupted again. After going through this a few times, I rebuilt the be (imported everything into a new, blank db). Same thing -- it was OK for awhile, then became re-corrupted.
So, my conclusion was that:
a) one of my frontends was corrupting it,or
b) my shared library.mde file was the culprit, or
c) my shared .mdw file was the culprit.
I have been meaning to unsecure my db's for awhile becuase I don't really use the security in any meaningful way. So, spent most of the day yesterday going through the steps to unsecure. So, I'm not using anything but the default .mdw file now. I also rebuilt every single FE, BE, and the library.mde.
Now, PCAMaster hasn't gone corrupt again (yet), but I'm noticing several other bothersome symptoms:
1. In one of my FE's, when I close it, the application closes but it leaves Access running. I have to use task manager to get access to close.
2. Some of my .ldb files seem to stick around when they're not supposed to. I am 100% certain that NO ONE is using the db. But the .ldb file is still there and I can't make it go away.
3. I open a FE with the /excl command line option. It opens OK, but when I try to repair/compact, it won't let me. ANd if I try to make design changes, it says I don't have exclusive access.
Hi, I've searched through the archives and cant seem to find an answer to my problem - hopefully someone may be able to shed some light on this for me as it is driving me mad!
One table in my database keeps getting corrupt records; I get various error messages when navigating a particular form - including 'Record is deleted' (when it hasnt been), 'The search key was not found in any record, 'Object invalid and no longer set' etc. After receiving one of these messages one or more records in my table corrupts (strange symbols and #Error# appears in the fields) - I have to compact and repair and delete the record.
I have imported everything into a new clean database several times but the same thing keeps happening.
Additionally the table that keeps corrupting is randomly 'losing' its primary key and relationships - they just simply dont exist anymore. I understand that importing into a new database could cause this - but they arent disappearing after I have imported; the database can be running fine and then after a few days I check the table again and the primary key is no longer set and the relationships to other tables have disappeared.
I am compacting and repairing every day and having to recreate a new clean database about once a week - and keep getting the same problems with the same table!!!
Has anyone seen this happen before and could anyone suggest where I would begin trying to resolve this. Any advice would be REALLY appreciated.
This error message appears when trying to open an Access XP database:
"Microsoft Access has detected corruption in this file. To try to repair the corruption first make a backup copy of the file. Then, on the Tools menu, point to Database Utilities and click Compact and Repair Database..."
But when you try to do what it suggests, it does not work. Even if you hold down the shift key when opening it, the message appears. Anybody have any ideas?
I have read a couple of other queries about this problem, but none seem to help me. I have a database, not too large (c.2000 records), not too complicated (very few macros, no referential integrity, no reports or subforms, mainly simple queries). Over the past few weeks records have started disappearing. Vanishing, no trace. No pattern to the record numbers. About 220 in all have disappeared so far. There is a main table (manuscripts), with links to other tables (manuscript notes, manuscript decisions). The records disappear from the manuscripts table, but the related records are left in the other tables. Only five people use the database, no one has deliberately deleted anything in fact as we keep all information.
Could this be a virus? I cannot believe that the database is too large.
I am in a dilly of a pickle here: after i set up my form all nice nice, with cascading combo boxes, other random combo boxes, a search button, setting up the SQL, etc. I was so proud- thinking i've finally done it! :) But then... as I reloaded the access form afterwards it only displayed in design views and SQL views, and not the other view. :eek: :confused: So, this being my first ever database, I have no idea what the problem is. I have checked the properties box, and it is not a problem with the settings -not - being on display always, nor with the other property settings. (I believe)
Any advice/input would be greatly appreciated into this matter :) Thanks a million in advance!
I have a combo box on a form, this combo box by the use of a select query shows all the relevant values in the drop down box from a table:mad.
My major problem appears to be that records that are selected in the combo box by way of the slect query seem to be disappearing from the table or part of the record is lost.
I have a large database with about 200 queries. I am having a problem with the last few I added. I run them from VB. When I run them the SQL statement disappears, sometimes. If I go to the SQL View instead of the Design veiw all that is left is Select;. I the Design View there is nothing.
I have a form that has a memo field. If text in the memo field is highlighted and I press the enter key the text is deleted.
Does anyone know how to prevent this from happening?
I know it is easy enough to click off the text (deselect it) so that pressing the enter key will move me to the next field (as required) but I don't always remember to do this and Hey Presto I've lost my text and have to start again.
But why highlight the text in the first place I hear you say. Well I have just pasted it in from a different application and it comes in highlighted.
I created a new DB and there are times when I open my form that all of my entry fields have disappeared along with their captions. Sometimes I am able to advance through different records and get the fields to reappear, otherwise I have to close the form and reopen it. What causes this and is there something I can do to prevent it?
I inherited this user written multi user (<=10 simultaneous users) Access 2000 database. The front end in Access 2000, the back end is SQL 2000. All the tables are linked to SQL. When the users were running the Access front end on a Novell server there were no problems. We have sinced moved it to a Windows 2000 server and are now getting a Database needs to be repaired message 2 or 3 times a day. I searched the web and the only thing I came up with is that the Opportunistic Locks Setting on the Windows 2000 server needs to be disabled. Naturally our server team is reluctant to change the settings. Has anyone else experienced this problem or have any suggestions? Right now our solution ws to put a copy og the Access frontend on each user's C:, very ugly and difficult to maintain! Thanks so much for your help!
Hi, With my database I have actually distributed the mdb file to 2 of my users so that they can make their own reports. I have secured it so that these users cannot delete/modify anything they shouldn't.
However every so often it seems to get corrupt. I did decompile it and I tried importing everything into a new DB and secured it again. It seems to be working again but I wasn't able to find what was corrupt so I'm not completely confident that its fixed.
Would it be better if I gave them the MDE file - would it lessen the chances of it becoming corrupt??
When I leave the job I guess I will need to show someone how to decompile it in case there is a problem?
Viewing an email from Code Project, I ran across this article about database corruption and thought it was worth posting here... Be sure and click on the immediate link below to view the latest updates in the discussion area at the bottom of the web page. ---------------------- http://www.codeproject.com/useritems/rdb.asp
Strange behaviors of an access database By Hamed Mosavi.
Introduction
A while ago I encountered a strange behavior in my application which was using an access database (.mdb file). I placed a question in the CodeProject C++ forum, and I did not get any answer. I started searching the web, MSDN, etc... and I found out that it's not all my fault. I found the reason in a knowledge base article. Look at it's description about the possibility of corruption of an access database file:
"There are several things that can happen, both inside and outside of Access, that may leave your database file damaged (corrupted). The symptoms of a corrupted database can range from #Deleted appearing in certain records, to you being unable to open one of the objects in the database, to you being unable to open the database file in Access altogether." (MSDN-Knowledgebase:283849)
Since I got no answer for my question in the forum, I thought there are at least some guys out there who might don't know this , and also since it's easy to corrupt a mdb file, while it's difficult to understand the reason why the application is not Functioning properly, I started writing this article.
The question is what might cause a damaged access mdb file and also how to repair a damaged access file programmatically.
Background
What can cause the mdb file to corrupt The knowledge base says:
"There are three main reasons why an .mdb file may become corrupted, as follows:
* Interrupted write operation * Faulty networking hardware * Opening and saving the .mdb file in another program"(MSDN-Knowledgebase:283849)
There's a detailed description for each one of these in the knowledge base, but some of important reasons are as follows:
* Losing power during database write * Dropping network connection * Abnormal termination of microsoft Jet connection, such as having task manager to shutdown application, power loss, manual shutdown. (notice that:Fatal system errors almost always cause abnormal termination, refer to kb to find out more information) * Forgetting to close ADO or DAO objects that opened. (Objects from classes like:Recordset, QueryDef, TableDef, and Database) * A large number of open and close operations in a loop (more than 40,000 successive open and close operations could cause corruption) * And worst of all, Opening and saving the .mdb file in another program like MS word. It is not recoverable. all your data will be lost.
"There is no way to recover an .mdb file that was opened and then saved in a different program" (MSDN-Knowledgebase:283849)
How to reduce corruption possibility
* Avoid all above * Compact the database often (The class provided with this article)
Things can get worst Q291162: AutoNumber field duplicates previous values after you compact and repair a database: Microsoft also announces that after we compact and repair our database, it is possible to encounter Duplicate Autonumber field, and if it's your database key, then... fortunately this applies just to those who are using Microsoft Jet version 4.0.2927.4 and earlier. "Microsoft has confirmed this to be a problem in Microsoft Jet version 4.0.2927.4 and earlier." (MS KB Q291162). to find out your Jet engine version try to search your system/32 directory for Msjet40.dll (if you are using v.4 and later) then get the properties of the file. This KB can help you find your version and download latest version:Q239114
Another bug exists there and it's "AutoNumber field is not reset after you compact an Access database" I don't describe a solution for this, since there is one already, and it is not really critical, for more information refer to KnowledgeBase Q287756.
if you lost data and have problem recovering data(yet), this can help you a lot: Q247771 and Q306204.
Using the code
In order to use the code, follow the following steps:
1- Copy DBFitter.cpp and DBFitter.h to your project. 2- Check and possibly change first two #import directives in DBFitter.cpp.
3- include DBFitter.h, Create an object from type DBFitter and use it as follows:
CDBFitter fitter; if ( !fitter.CompactAndRepair(szDbPath,m_szDBPass) ) { AfxMessageBox(fitter.GetLastErrString()); }
CompactAndRepair has 3 forms that can be used alternatively. The first one you see above , The other form just gets database file path as input and does not use password
CompactAndRepair(CString szDbPath)
The last one asks for a source, a destination and password, which can be given "" as password to say there is not a password
4- Don't forget to call AfxOleInit(); in the initialization of your application.
"What to Make Sure of Before You Run the Compact and Repair Utility Before you run the Compact and Repair utility on a database, make sure of the following:
* Make sure that you have enough free storage space on your hard disk for both the original and the compacted versions of the Access database. This means that you must have enough free storage space for at least twice the size of your Access database on that drive. If you need to free some space, delete any unneeded files from that drive, or, if possible, move the Access database to a drive that has more free space.
* Make sure that you have both Open/Run and Open Exclusive permissions for the Access database. If you own the database, make sure to set these permissions. If you do not own the database, contact its owner to find out if you can get these permissions.
* Make sure that no user has the Access database open.
* Make sure that the Access database is not located on a read-only network share or has its file attribute set to Read-only. " (Q283849)
Compact and repair in C# Thanks god, there is already an article: http://www.codeproject.com/cs/database/mdbcompact_latebind.asp
--------------------------
If there are any questions or feedback; please direct them to the original authors link at the top of the page so everyone can benefit.
Hi guys i will appretiate it any hlp you can give.
A few weeks ago i started to experiencing problems with my access2k db. Some times i could open it and sometimes an error like this one.
"Microsoft Access has encountered a problem and needs to close. We are sorry for the inconvenience. It asks to send a report and to repair the db
more data: 1- my jet engine version is 4.0.9025.0 2- because i eliminated the cross from everyform in the db sometimes i had to close access from the task manager. 3- i have never compacted the database. 4- it is still in development phase, so there are only a few records. 5- In order to use the db i have to use a citrix session in the usa (i am in australia), and from the citrix server connect to another drive in the usa. I also moved the db in the citrix server but i had the same problem.
Question: if i copy the forms into a new db, will i have the same problem?
I have a small database being used concurrently by 5-6 users, in the last few weeks we have had some corruption issues, the users are running a mix of access 2000 & 2003 – would unifying versions help these corruption issues?
Also what is the recommended maximum number of simultaneous users accessing one a DB in a LAN/WAN environment?
I believe I have discovered a new way of fixing corrupted forms in Access.
After a crash, one of my forms refused to open in either design or form view saying: Form name | is misspelled or refers to a form that doesn't exist
Having searched the internet for this error I found lots of people recommending Repair/Compact or copying and pasting the currupt object into a new database.
Repair and Compact (Access 97) both ran successfully but failed to fix the problem.
When I attempted to copy and paste the broken form either within the database or externally I got
Error 13: Out of Memory
When I attempted to import the form into a new database I got
Automation error
If I attempted to rename the form, I got:
The save operation failed
Resolution: (I don't know which step here was the key to my success) 1) Delete all other database objects (all tables, queries, forms, macros and modules) 2) Create a new form and put any control on it. 3) Attempt to save the form using the same name as the corrupt form 4) Access asks "The name you entered already exists..." (Aha! The first time Access is admitting that the corrupt form exists.) Say no to this prompt. 5) I was now able to rename and open my corrupt form. Everything was fine.
If this post stops just one other DBA having to go through the morning from hell I just went through then it'll all have been worthwhile!
I have been searching for an answer to this, but no luck. Has anyone ever seen the below error when loading an Access 2003 database?
"[database name] has detected corruption in this file. To try to repair the corruption, first make a backup copy of the file. Then, on the Tools menu, point to Database Utilities, and click Compact and Repair Database. If you are currently trying to repair the corruption then you will need to recreate this file or restore it fom a previous back up."
The database is already compiled and compacted. It's a new Access 2003 program. Only one user is experiencing this problem. She is on XP while the others are on Windows 2000. Everyone is using 2003. I saw other odd error messages on this machine with other databases, but I was able to avoid them by setting the Macro settings to Low. This is a Network environment. Any thoughts?
i'm getting annoyed by Access 2003 (and 97 for that matter!) just corrupting records in a table and then i have to scrabble around, kicking people out the database, compact & repairing, maybe installing the back up copy and in one case, doing a make table query from the data table that excluded the corrupted record
:(
are there any general things i can do to avoid these things, or am i just going to have to roll with them?
I have a form with an unbound subform that was working quite nicely. The only change I made was changing the data source for the main form from a query to a static table; name of table same as the prior query. Now the subform appears but the data doesn't. The buttons in the subform header are visible and work but the detail is not visible when displayed as a subform, it is fine if I open the subform as a separate form, I see the correct records based on the main form's criteria.
I have searched for some property I may have accidentally changed but can't find anything. It isn't set in data entry mode, not even a blank line shows.
I have a form called CreatePL which is made up solely on List Boxes that the user must choose from. After all the choices are made, I have a button to save the information to a table called PL.
I noticed that after clicking on this button, that record stays active so when you try to create the next record, it is actually changing the previous record. As I was testing this a bit further, I also noticed that the one of the names in one of the list boxes got erased (I'm not sure how yet).
Is there a way to lock the information but still be able to make selections and save it to a table? When I choose the properties so that you can't edit, I loose the ability to make choices also. All of the list boxes are set to "limittolist".
I've got a form with a series of combo boxes which are dependent on each other, however i keep finding that after ive entered some data and left a record, when i then return to the record, some of the information ive entered has been deleted and the combo box is blank.
I think it must be requerying the combo boxes everytime the record opens but i dont know why, i have only put requerys "OnChange" because that is the only time the dependent combo boxes should be requeried.
Once the info is entered and ive moved on to a new record, i need for it to stay that way when i return to the record and only change again when i edit it.
i have tables called JobRecords and Customer, JobRecords contains 10,000 invoices (jobnumber 1-10000, but all are blank) these 2 tables are related by ContactRef. the idea is to select the ContactRef when entering an invoice and it will automatically fill in the address, phone number fields etc from the Customer table.
now since i need a VAT and Total values, i used a JobRecords Query, when creating the entries i had the default value for ContactRef set to (select) which in the Customer table has N/A values for all fields. my form shows all invoices with data from the jobRecords Query and Customer table, so when i added some new contacts into the Customer table, and then changed some of the invoices to show these addresses instead of (select) and N/A, they disappear.
i know that if some of the fields are null then it wont show the entire entry but even making sure all fields have data in it, it still doesnt appear in form view. it doesnt dissapear in the JobRecords Query either only the form.
I have a main form and on my main form i have a button to open a popup form. very simple docmd.openform statement. This is an unbound form that lets user filter and select some data to populate the main form.
My problem: When i update code in the form and reopen it (via button or navigation pane) i cant see it. I know its open but i cant see it. If i change popup-no then it opens and i can see it, if i change back to popup-yes, i cant see it again. The problem only happens after i open VBE for this form. I've been importing older versions of the form, opening VBE and the phenomenon occurs everytime.
I have a split database. BE located at a server and FE on each users workstation. There are 8 concurrent users at the most. This runs smoothly over the LAN.
Now I'm adding a new feature to the database. I'm using a wheel loader to weigh products on a weight scale. The operator in the wheel loader is going to use a laptop with wireless LAN to connect to the network.
In risk of loosing the connection which in worst case might corrupt the database, I want to make a new database with a BE/FE setup. The BE will be placed on the same server as the current db. The FE in the wheel loader. I can then link from the current db (BE) to the new db (BE).The new db will only require two linked tables from the current db.
If worst case happens, would my current db be more protected against corruption than if I linked directly to the BE on the current db. I know there's no 'right answer' to this one, but I'd really like some opinions on it though.