Access Database is getting corrupt again and again

Anonymous
2018-06-01T17:47:41+00:00

We have an application which was working okay till last month. But after the last windows update our clients are getting issues with access database. access database got corrupted.  We ran compact and repair. But it still getting corrupted again and again.  This issue started right after the window update. clients are on different OS. Like server 2018, server 2012 and windows 10.

Is there anything i have check in new windows update or any other step to prevent database corruption?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

604 answers

Sort by: Newest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2021-04-13T14:45:18+00:00

    Back in May 2020 there was an update ver. 16.0.12827.20160

    Which broke queries on our Office 2016 retail installs.  The only way to fix this was to rollback the update. 

    if you look for the pre release notes they are not available any more. 

    https://docs.microsoft.com/officeupdates/release-notes-office365-proplus?Ver=16.0.12827.20160&Branch=FirstReleaseCurrent&Arch=64%2c64&XMLVer=1.6&xmlPath=http%3a%2f%2fofficecdn.microsoft.com%2fpr%2fwsus%2fofl.cab&xmlFile=O365Client\_64bit.xml&ServicePath=https%3a%2f%2fconfig.office.com%2fapi%2ffilelist%3fChannel%3dFirstReleaseCurrent&Version=16.0.12827.20160&AllLanguages=True

    If I remember correctly the issue was something in the path changes. 

    • This update fixes an issue in Microsoft Office where Visual Basic for Applications projects with references that are expected to be found by searching locations specified in the PATH environment variable may not be found properly at runtime, leading to VBA runtime errors.
    • This update fixes an issue in Visual Basic for Applications in Microsoft Office where certain VBA projects that contain references to code libraries with DBCS characters in the library name or library path would be viewed by the Office application as corrupt on load.

    I have not tried to update those systems since. I may go ahead and try an newer update to see if works since it has been a few months.

    Looking at the archived release pages there has been updates to fix queries in Access. 

    The issue with having many clients is that they all need to be on a working build. Then after the update to one or two you can find out if the update breaks the functionality of your database.  Then you have to roll it back. If you just update everyone's build and it breaks, you end up with a bunch more work doing rollbacks. 

    https://docs.microsoft.com/en-us/officeupdates/monthly-channel-archived#version-1907-july-29

    https://docs.microsoft.com/en-us/officeupdates/update-history-microsoft365-apps-by-date

    https://support.microsoft.com/en-us/topic/fixes-or-workarounds-for-recent-issues-in-access-54962069-14f4-4474-823a-ff7e5974a570

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-03-26T10:15:30+00:00

    If you are required to use a company VPN to connect to their app/database, is there an improvement in performance after the SQL conversion ?

    Hi George,

    In my experience, a SQL Server backend will perform better than the equivalent Access back-end in concurrent multi-user use once any inefficient Access functions have been optimised for SQL.

    More specifically, I believe it is still not recommended to connect an Access front-end to an Access back-end over anything other than a cable LAN. If your VPN involves an Internet connection in the aforementioned configuration, then any corruption you are experiencing is just as likely to be due to the intermittent nature of Internet connections as the Windows 10 issue, in my view. Having said that, I do have one client who was running such an application over a (very expensive) corporate global WAN without issues until the users started working from home. But this is quite a light-weight application, specifically designed with this usage in mind, and it is rare for more than one user to be updating at any one time. Even so, use on domestic connections is now causing regular corruption.

    SQL Server, on the other hand, is perfectly suitable for this kind of usage. Therefore, the answer to your question, if I have understood it, has to be "yes". (I just wish my client's IT department would agree to its use in the above case!)

    I have been able to convert my own applications in around 100 hours, but these are systems which have "outgrown" Access. I am aware of cases where the data has simply been migrated across using the automated tools, and the application has continued to run satisfactorily, with no "conversion time" as such. Then again I have seen complex modules, developed by others, which just time-out, and in the end have to be completely re-designed.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2021-03-22T01:51:33+00:00

    This comment is meant to contribute of this discussion about alternatives to using Microsoft Access.  

    In particular, it's about moving the back end data tables to SQL Server.  I did this about 14 years ago, keeping the front end forms in Microsoft Access, but linking to SQL server via ODBC.   It has about 30 tables, one of them several hundred of thousand of records, many with tens of thousands of records. In the last year about 20 of the other Access databases I've built and looked after have hit the "corrupted again and again problem".   One has been fixed using the registry setting, as suggested by Daniel Pineault a number of times in this same chain of comments. In the others, the medium to large organisations hosting the Access databases are unwilling to change registry settings to attempt this version of the fix because they are fearful of collateral damage to other unrelated programs, and the problem continues, but does seem to be a little less frequent over time for some reason unknown to me.

          The database with the SQL Server back end has never had the "corrupted again and again" problem, verifying what Daniel Pinault and others have suggested as a possible fix.

          My comment is relevant to questions about the level of success and the level difficulty of the SQL Server conversion.    In terms of the level of success, Access queries were taking 30 seconds or even minutes to return.   The same queries, re-constructed as in pass-thru queries to SQL Server, have consistenly taken only a few seconds.  

             The conversion took hundreds of VBA programming hours and a good bit of learning about SQL Server, partly because the database has around 100 forms and quite a few tables and relationships.    It's also partly because of some good advice from Microsoft's Kalen Delaney, in her 2001 book, "Inside Microsoft SQL Server 2000".   

             The rest of this entry is not my words but is a quote from Kalen Delaney.  It's the introduction to her advice on SQL Server conversions from products like Access, taken from her now 21 year old Microsoft Press Book. You can see this advice at https://flylib.com/books/en/3.172.1.104/1/

            Before you proceed, you must understand something crucial about using cursors: You should never let cursors turn SQL Server into a network ISAM.

    You might recall from Chapter 1 that the initial grand plan for SQL Server called for it to be a higher performance back end for Ashton-Tate's dBASE IV. dBASE was really a record-oriented, ISAM-like data management system (that is, it did sequential, row-by-row processing). It was not set based. At the time, SQL Server didn't use cursors, which made a difficult task even more difficult. The original plan to make the two record-oriented and set- based systems totally compatible and seamlessly interchangeable was doomed from the outset because of inherent differences in the models. If the original SQL Server had featured the rich cursor model it has now, cursors would have been heavily used to build the dBASE IV front end from the start. But it was probably better that the impedance mismatch became obvious. It forced the SQL Server development team to reexamine its basic goals and dramatically improve its plans. It also highlighted the importance of orienting oneself to work with sets of data, not individual records as one would do with an ISAM. Had cursors existed then, they probably would have been misused, with the result being a bad SQL Server front end.

    Cursors can be an important tool when used prudently. However, because cursors are record oriented, developers who are familiar with ISAM systems (such as IMS, dBASE, VSAM, or the Microsoft Jet database engine used in Microsoft Access) are often tempted to use cursors to port an application from an ISAM system to SQL Server. Such a port can be done quickly, but this is also one of the fastest ways to produce a truly bad SQL Server application. In the basic cursor example shown previously, the operation to fetch each row of the authors table is much like an ISAM operation on the authors file. Using that cursor is an order of magnitude less efficient than simply using a single SELECT statement to get all authors. This type of cursor misuse is more common than you'd think. If you need to port an ISAM application to SQL Server, do a deep port that is, go back and look at the basic design of the application and the data structures before you do the port. A shallow port making SQL Server mimic an ISAMis appropriate only if you're one of those programmers who believes that there's never time to do the port right but there's always time to do it over.

    For example, even a modestly experienced SQL Server programmer who wants to show authors and their corresponding book titles would write a single SELECT statement similar to the one below that joins the appropriate tables. This SELECT statement is likely to yield subsecond response time even if all the tables are large, assuming that appropriate indexes exist on the tables.

     SELECT A.au_id, au_lname, title FROM authors A  JOIN titleauthor TA ON (A.au_id=TA.au_id) JOIN titles T ON (T.title_id=TA.title_id) ORDER BY A.au_id, title 

                 NOTE When we refer to response time, we mean the time it takes to begin sending results back to the client applicationin other words, how long it takes until the first row is returned. 

                     In the example above, all the join processing is done at the back end and a single result set is returned. Minimal conversation occurs between the client application and the serveronly the single request is received and all the qualifying rows are returned as one result set. SQL Server decides on the most efficient order in which to work with the tables and returns a single result set to satisfy the request.

    An ISAM programmer who doesn't know about an operation such as a join would approach this problem by opening the authors "file" (as an ISAM programmer would think of it) and then iterating for each author by scanning the titleauthor "connecting file." This programmer would then traverse into the titles file to retrieve the appropriate records. So rather than write the simple and efficient SQL join described above, the programmer might see cursors as the natural solution and write the code shown below. This solution works in a sense: it produces the correct results. But it is truly horrific in terms of its relative complexity to write and its performance compared to the set-based join operation. The join would be more than 100 times faster than this query.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2021-03-19T20:53:05+00:00

    Hi David,

    You have mentioned frequently converting an Access backend database to SQL Server, SQL Server Express or SQL Azure as a solution to the ongoing, officially unresolved Access database corruption issue with Windows 10/Access 2016 or 2019. If you are required to use a company VPN to connect to their app/database, is there an improvement in performance after the SQL conversion ?

    Was this answer helpful?

    0 comments No comments