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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Repair 1

Status
Not open for further replies.

RoseV

Programmer
Mar 18, 2003
37
US
I keep getting an error that a database needs to be repaired. It is already a front end/ back end setup and the problem occurs in the back end. All this database holds is the data - the users do all data manipulation locally. I cannot seem to find why it keeps needing to be reapired like this.
Any ideas would be appreciated.
 
Rose:

One of the primary causes I have seen for this situation is when the database is closed improperly (Access locks and has to be closed from Task Manager; system locks or crashes, etc).

This will often result in an internal edit flag being set and not released or reset. When the database is next opened Access sees this flag and interprets it as an error.

I'm sure that there may be additional causes but this is the first one I would check. Poll your users to see if any of them have had system crashes or other, similar incidents while entering/editing records.

HTH

Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
The message is generated in the front end, but it's the back end that needs to be repaired. Nobody has reported any systems crashes/problems/errors - they all say it was working perfectly and then all of a sudden, they can't get to the next record and get the "unrecognized database format, blah, blah..." pointing to the backend path on one of our servers. I have tried keeping users from exiting incorrectly, exiting when there's an error instead of calling me over, as these might generate this error. But we still keep getting this.
 
Rose:

I don't want to disparage your users; but, they have been known to suffer from the 'Not Me' syndrome. And they may be correct that they did not do anything; it could have been a dropped packet on the network or some other system error

MS has a utility called LBDViewer that can sometimes identify the system/user which which caused the error. One of the columns in the display is labeled suspect. Look for a user/system with the value Yes in that column to identify which machine may be causing the problem.

I have trouble pasting links here, don't know why, but this is the Knowledge Base article number for the Jet Lock utility: 176670. It contains the LDBViewer and a lot of other good information. I would also suggest KB articles 109953 and 182867. Both deal with troubleshooting database corruption (in Access 97) but should be relevant to 2K or later.

Tracking these things down can be a frustrating endeavor. I have one user with Windows 2000 Professional and Office 2000 running an A2K frontend against an Access 97 backend. If she opens a legacy VB frontend and also opens the A2K frontend that both use that backend we get a mangled db. It can be recovered using the repair utility so we don't lose anything except time. Our IT guys have been pulling out what little hair they have left trying to figure this one out.

Hope these bits of info help you. Keep us posted as you work through this and we'll see if we can contribute any additional help or ideas.



Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Larry

You get (yet another) star. Great research. Your comment regarding users is legitimate. In fact less exprienced users may not know even know they are exiting improperly.

Being an IT guy and somewhat folliculary challenged, I had a good giggle regarding your comment about your IT guys pulling out their hair. :)

Rose, you may want to create a command button on the main form. The form exits / closes the Access database, but before doing so, it tries to capture the user information and the date/time. (If you don't have Access security in place, you may be able to capture the login information.) This will influence users to exit gracefully, and give you more info in tracking down the problem. (For example, who does NOT show up in the log file.) I guess you are aware that you can remove the windows control buttons with Access if you want to got this far. but hopefully, you have cooperative users.

Richard
 
Richard:

Thanks. Like you, since most of my hair has departed for parts unknown, I no longer have a part.

In order to disable (sort of) the application close button, I use a hidden form with a single check box set to False; in the form's OnUnload event, I use this code:

If chkExit = False Then
Cancel = -1
End If

This prevents the user from closing the application by inadvertantly, or intentionally, clicking on the close button and forces them to use the command buttons on the form/s. In the OnClick code of the application quit button I change the chkExit value to True.

I like your idea of capturing the user name. I think I'll tinker with a process for capturing the user name at log on and then deleting it at log off; any remaining names would, as you say, identify a possible problem user/system.


Rose:

There are so many variables involved in tracking down these types of errors that it can drive one to distraction.

Because of all the possible causes, I would suggest you keep a detailed log of all the step and results you take in tracking this down. Not only will it keep you from repeating earlier steps, it can also serve as a guide if, in the future, you encounter similar problems.

Keep us posted and let us know how you get on with this.



Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
It's an MDB file.
Thanks for all your suggestions! I have literally smacked hands over the proper exiting of the database. I know with users, it's usually safe to assume...but in this case I think it's something else. I have even blocked their menu bars (up top with the close button) when the database opens. If anyone thinks of any other things, I'll welcome your help. Until then, I'll keep trying. My problem being that I am the sole programmer for a dept of 30+ and not one of them understands programs or the fact that sometimes, it's a while before something is resolved. At this point, they're crying "shoddy programming"...perhaps. But perhaps not.
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top