Access Corruption Problems - Experts Only
hi all,
i am building applications using VB6 with Access 2K database and ADO, well the access is fine and cheap but it is making me a headache when used by multiusers.
My database code is simple., like the following
'db as connection
VB Code:
db.begintranse
db.execute ("delete * from invoices where code = 13")
db.committranse
now the questions:
1 - is this code problematic when executed by many users on the same dbase file thru a LAN
2 - How could i check to see if anyone is writing to the same table in the same time.
3 - is there a problem in concurrent readings from the same table., = many users are performing select sattements on the same table in the same time.??
4 - Can anyone advise me how to protect my dbase from multiuser corruption , as i am facing now a lot of (Unrecognized database Format) with the access.
5 - i want to make a backup from my access database, should i copy it by using (FILECOPY) or should i make a replica
6 - what will happen if i tried to backup the database while someone is doing anything in.
7 - how could i check that i am the exclusive user on this database
8 - how could i make a replica from an access database with VB6 Code ?
Well i know this is lenghty and hard but i am open to any ideas and willing to share this problems and solutions with other people along with my self
THX in Advance
BST RGDS
Access Corruption Problems - Experts Only
hi, maybe i can help...
in opening the recordset, the adOpenDynamic and adLockOptimistic will help you. most especially your database is being accessed by many users at the same time.
sample :
recordset.open "select * from table", connection, adOpenDynamic, adLockOptimistic
the adOpenDynamic will always synchronize the recordset you are calling with the database. while the adLockOptimistic will lock records only when you call the update command.
Re: Access Corruption Problems - Experts Only
Hi,
I know this is old thread but I wanted to post it here in case someone else came across these common issues.
Q.2.Visit the below URL to check who is logged in to the database and working on the same
https://docs.microsoft.com/en-us/off...on-to-database
Q.3. Visit the below discussion URL for this query:
https://docs.microsoft.com/en-us/ans...n-a-table.html
Q.4. Yes, there are some workaround and third-party tools that can help to protect the database from multiuser corruption:
You should try to keep things away which can impact the corruption of the Access Database.
1. Don’t Leave Your Database Unnecessarily Opened.
2. Avoid Using MAC And Windows On The Same Network
3. Be Careful While Using Database On A Wireless Networks
4. Regularly Utilize Compact and Repair Applications
5. Split MDB or ACCDB Files
6. Utilize Decent Network Cards
7. Keep Updated With Latest Drivers
8. Change the Suspected Network Element
9. Defragment the Network Hard Drives
10. Terminate the Connection When Not in Use
And for getting, again and again, error “Unrecognized Database Format”, Please go through the following solution to solve this error:
There is a known issue with a Windows Update that is associated with this problem. This error refers to database corruption, And the reasons for the database corruption are:
1. System Virus
2. Sudden shutdown of system
3. Abruptly cancellation of MS Access file
4. Software Malfunction
5. Improper Data Sychronization
Workarounds you can follow to solve this error:
Workaround 1: Go back to the Previous version of MS Office
Steps to follow:
1. Open the database, and in case it is shared, the user needs to affirm that it is unopened.
2. Click on the ‘Tools’ menu. Point to the best database utilities.
3. Click ‘Convert Database’ and then press ‘To Access version File Format.’
4. Now, type the file name in the ‘File Name box’ of the ‘Convert Database.’ Click ‘Save.’
Workaround 2: Repair the database from “Compact and Repair” Method i.e inbuilt method of MS office to repair database.
Steps to follow:
1. First close the database
2. And then Backup database
3. Click on the ‘Tools’ menu and point on the database utilities. Click the ‘Compact and Repair Database.’
4. Specify file name. Click the ‘Compact’ option from the database so that the user may compact in the dialog box.
5. In the dialog box which is named, ‘Compact Database,’ specify the compacted Access file name as well as the destination. Click ‘Save.’
I hope these workarounds could help you.
Q.5. To Backup the access database, follow the below process mentioned:
https://support.microsoft.com/en-us/...a-ee81f8d6356c
Q.6. Please visit the following thread where every possible reason is mentioned about backing up access database while database is in use.
https://social.msdn.microsoft.com/Fo...jmanageability
Q.8. To make the replica from an access database with VB6 Code, visit the below thread:
https://www.vbforums.com/showthread....ation-and-Sync
Best Regards,
Aron