With the 2013 version, am getting sometimes the error message "can't open company file"

This is happening quite a bit and sometimes no problem. Now with an upgrade from Windows 8 to Windows 10, the problem is worse.

  • 0
    What happens up to the time that you see the error message?

    Where is the data stored (File | Properties)
  • 0 in reply to RandyW
    The software goes through the normal start up. Then it finally tries to read the file. It says it is reading the file, then verifying it, and the next step is to display the main company page. Just before that, I get the error message, "can't open the company file". This has been happening for a while. I could get out of it by re-booting the computer and then the file would usually open. I have now upgraded from Windows 8 to 10 (sorry I did it) and now the problem is a lot worse. I can't read the file from the hard drive at all, but it will work half the time when I read it from backup which is on a USB external device.

    On the hard drive, the data is stored in a folder which is a sub-folder under the main Sage 50 data file. The property look to have all of the proper permissions for accessing the file.
  • 0 in reply to Jim Morton

    Jim Morton said:
    On the hard drive, the data is stored in a folder which is a sub-folder under the main Sage 50 data file. The property look to have all of the proper permissions for accessing the file.

    If you mean that the data is stored in ibdata1, that is in a folder that has the extension '.SAJ', that's a given.

    If you mean that the data directory is under the program directory, then that can be problematic.   Some anti-malware may lock, interrupt, or just generally interfere with any data access that alters files in any of the 'Program Files' or 'Program Files (x86)' folders. 

    On a single workstation installation, Sage 50 uses a loopback tcp/IP connection to send data 'out' on a negotiated port.  To some antimalware, this may appear to be the work of dark forces attempting to communicate with their evil overlords.

    You may be better off using the 'My Documents' folder structure, and the security systems of Windows may 'stand down' somewhat.

  • 0 in reply to RandyW
    I'm sorry to completely mislead you. The data file is under Documents, not under Programs/Sage 50 as I said.
  • 0 in reply to Jim Morton

    Do you have any sort of software that may be attempting to 'sync' your My Documents folders with data in some other place?  (i.e. Windows Roaming Profiles, DropBox, any of the oft-renamed Microsoft online document storage tools?)

    In that category I would include any continuous online backup software, since it constantly monitors the disk for changes, and may not recognize Sage 50 as a database.

    Other than that:

    Microsoft file compression, or Microsoft file encryption.   Neither is compatible with a database.  Some memory sticks come with encryption software, it's also not compatible. 

    If the file is very large, you will get better performance, and may get improved reliability if the database buffer settings are increased from the default (56 MB)

    Other than that, it's not uncommon for a firewall to be a problem, but usually it will completely prevent opening the file.

    There are (cryptic) error logs in the .SAJ data folder that may hint as to what went wrong.   The Windows Event Log should show the cause behind a program crash.  Sage 50 relies heavily on the .NET framework, which works great when it works, and sometimes doesn't quite.

    I hope that helps, please post back.

  • 0 in reply to RandyW
    Thanks very much. I'm going to go over your thoughts in detail, but probably not until Wednesday. I have to be away tomorrow.
    I'll get back to you.
  • 0 in reply to Jim Morton
    Going by your advice, I change the buffer size from 56 mb to 100 mb. So far, it's working. Your advice is invaluable.
    I'll keep monitoring it.
  • 0 in reply to Jim Morton
    Having increased the buffer size from 56 to 100 mb, I can open the database reliably from my USB backup every time.
    However, it won't open from my hard drive even when I increased the buffer size to 200 mb. Any other thoughts?
  • 0 in reply to Jim Morton

    Hi,

    Increasing the buffer size just allows the database to mostly run from memory, so it speeds up access, which would help if the disk is 'timing out'.   Increasing it beyond the size of the entire database shouldn't normally make any difference.  

    If the system is very short on RAM, the buffer in RAM can get swapped out to disk, which REALLY slows things down, especially when the swap file is on the disk it's trying to read from.

    If it works on the USB, but not on the hard disk, it's likely that something is preventing the database software from reading / writing to the hard disk freely.  

    The list of things that can do that is fairly long, for example any type of backup software, synchronization, desktop search, Microsoft indexing, anti-malware, or disk compression software.  

    Troubleshooting is just like my kids learned on Sesame Street - 'One of these things, is not like the other...'

    USB devices are often formatted as FAT32, which cannot be compressed, so that's a possible difference.

    Most synchronization and indexing software (and even backup software) will try to back up the 'My Documents' folders, and won't try to back up a USB device.

    What to try:

    Try creating another folder in the root of C:, such as 'C:\WinSim'   Restore a copy of the company data there, and try working with it.  It's that any 'sync' or backup software that it will ignore that folder.

    A failing hard drive may have errors on it.   MySQL runs a full check of all the 'blocks' of a database, every time you start it.  If the data read back does not perfectly match the checksum from the last write, it will stop loading.   Run a disk check of C:  (under the 'tools' tab in Explorer 'properties' for a drive).  

    Get a really good USB 3.0 device and use that temporarily / instead.   The last 2 TB portable 2.5" drive I purchased was $135.   Technically, it's slower than the laptop's 7200 rpm hard disk, but practically, the hard disk in my laptop is busy doing dozens of little errands for Windows, and the portable drive has nothing to do but record and retrieve accounting entries and music, so it actually responds better in real world use.

  • 0 in reply to RandyW
    Thanks so much. I will work some more on your recommendations.