Skip to content

Sage Error: “I/O Error in variable length part of record” in .DAT file

Sage Error: “I/O Error in variable length part of record” in .DAT file

Sage error “I/O Error in variable length part of record” occurs when the preferences file for the accounting software is damaged. The damage causes the file to become unreadable. So when you launch Sage 50, the program fails to parse the data in the preferences file, and throws an error. One easy way to fix the I/O error is to delete the USERPREF.DAT file that will be automatically recreated when you launch Sage 50 the next time. We’ll also look at fixing this error if you host your company file on a separate server.

In this post, you’ll learn how to fix the Sage error “I/O Error in variable length part of record”.

Error: “I/O Error in variable length part of the record”.

Causes of Sage error “I/O Error in variable length part of the record”:

  • USERPREF.DAT file damaged
  • Share folder contains the company file and the preference file.
  • User hasn’t mapped the company file location properly.

Solution for Sage Error: “I/O Error in variable length part of record”

Since this error has one specific cause, we can rely on a single solution to fix the error. You’ll need administrative rights to make the changes required to fix this error, so you need to use an administrator account in windows.

Steps to fix Sage error “I/O Error in variable length part of record”:

  1. Go to File Explorer.
  2. Click on the search field in the top right corner of the window.
  3. Choose All Files and Folders.
  4. Input Company.DAT and hit enter. Wait for Windows to locate the file.
  5. Click on view from the toolbar, and choose Detail.
  6. Note the location of the company file and preferences file from the folder column.
  7. Right click on the Folder for the company file.
  8. Choose Copy and paste the folder in the correct location so that Sage 50 can access it when you launch the program and log into the company file.
  9. Close Sage 50 on all your systems.
  10. Open the File Explorer, and go to the Folder containing the Company File.
  11. Right click on the USERPREF.DAT file.
  12. Choose Delete, or click on Rename, and append old to the end of the file name.
    Note: deleting the user preference file doesn’t affect your data in any manner. While you’ll have to configure the preferences for the Sage 50 company file once again, you’ll not lose any of your data.
  13. Close File Explorer, and log into the Sage 50 company file that gave you the error in the first place.

When fixing Error “I/O error in file UserPref.DAT” in Sage 50, deleting the user preference file is essential because the damaged file will not let you access the company file. And until you can access the company file, you cannot make changes that will fix the error.

The good thing here is that you don’t lose any of your accounting data if you delete the user preference file. The primary reason for this is that the userpref.dat file contains data for user preferences. So all the settings that you chose are stored in this file. When you delete this file, Sage 50 creates a new one. You simply have to reconfigure all the options and settings so that you can get back to work.


This is all in our simple guide for fixing Sage Error: “I/O error in file UserPref.DAT”. I hope that you were able to fix this error easily. We have a frequently asked question section that further elaborates some of the points in this article. And you can always reach out to our accounting software experts if you need additional help with such errors.


What does the userpref.dat file contain?

How to recreate the userpref.dat file after deleting it?

Will I have to recreate the settings for my company file if I delete the userpref.dat file?

Speak to a Specialist about Your Sage Software

Headache🥺. Huh, Save time & money with Sage Technical Support 24×7 @ +1/, we provide assistance to those who face problems while using SAGE Peachtree (Support all U.S. & Canada Editions)

--- Support - We provide solutions for the following Sage (50, 100, 200, Payroll, Peachtree, Cloud, 3X, Impact, HRMS, CRM, ERP, One & Fixed Assets) ---

  • Error Support
  • Data Import
  • Data Conversion
  • Payment Solutions
  • Upgradation
  • Payroll Support
  • Data Export
  • Software Integration
  • Sage Printer Support
  • Complete Sage Solutions
  • Tax-Related Issues
  • Data Damage Recovery
  • Installation, Activation Help
  • Sage Windows Support

Disclaimer : is a provider of advanced support services related to SAGE accounting software. It also holds a flagship in catering third-party tech support services for accounting software (SAGE) and peripherals. Read More -›



Toll Free: 800-892-1352 user