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

Access database corrupt 2nd time in 2 days..?

Status
Not open for further replies.

MikeCox

Programmer
Jun 4, 2001
340
US
Hello!

I have an Access97 database and a VB 6.0 front end, connected via ADO. I have about 20 read/write users (only about 6 are actually updating at any given time), and about 30 read-only users. Read/write access is handled in code, not in the connection, so essentially I have 50 read/write users, but only a few of them actually hit the database with updates.

This morning is the second time in as many days I've had to repair the database using Access. The repair seems to go well and cures the problem, but I'm wondering what can typically cause this to happen? I've been told that an average of 6 users adding/updating records should not cause this. One of our network drives was recently infected with W32/FunLove.exe but the drive my database resides on does not seem to have any symptoms of this.

Thanks for any ideas, I really need to take measures to prevent this if I can, but I first need to know what can cause this corruption.

-Mike Difference between a madman and a genius:
A madman uses his genius destructively,
A genius uses his madness constructively.
 
Twice in 2 days sounds bad, but what is the longer term rate?

Does your programme crash or do you have any users that switch computers off incorrectly?

Repairs always seem to work, and never seem to lose data. I have had an Access database drop an index, so it all went terribly slow until it was fixed. Peter Meachem
peter@accuflight.com
 
I would also chect the lock types you are using when you open the database in VB. Also check the Default Record Locking setting in your ACCESS table under >Tools > Options
 
Corruption can occur by not closing an ado connection. faulty network connections or hardware. etc. the main thing is you can recover the db so if it was to be hardware it would corrupt the file .mdb in wich case you would not be able to repair. i think possibly un closed connections possibly due to network hardware failure or program not closing connections. microsoft have a utility explained by text pasred below wich will allow you to see who is possibly corrupting the database. if always one macine look at its hardware. if more than one look at program not closing connections.


You can determine which workstation and user caused Jet to mark a .mdb file as suspect with the LDBView utility, which is available by downloading Jetutils.exe from the following Microsoft Web site:
For additional information about the Microsoft Jet Utilities, click the article number below to view the article in the Microsoft Knowledge Base:
Q176670 ACC: Microsoft Jet Utilities Available in Download Center
Ldbview let you observe which users are currently logged into the database, as well as any users that may have left the file in a suspect state.
 
Thanks everyone!

I checked the default record locking, and it's been set at No Locks. Should it be set to Edited Record?

Also, I haven't been closing any connections when users close forms/application, I'll certainly make that change.

-Mike
Difference between a madman and a genius:
A madman uses his genius destructively,
A genius uses his madness constructively.
 
You should change the default record locking.
I personally keep the connection open only for the transaction at hand and close it as soon as possible.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top