"I/O error, pervasive status code 46"

Posted on 2008-02-07
Medium Priority
Last Modified: 2012-06-27
I  have a user who while in Timberline Accounts payable module receives an "I/O error, pervasive status code 46" almost daily.  
Question by:rlstewart
  • 3
  • 2
LVL 29

Accepted Solution

Bill Bach earned 2000 total points
ID: 20851211
A status 46 is "unable to write to file".  The most common causes are:

- Having ReadOnly access rights to the file.
- Having a file flagged ReadOnly.
- Accessing a Btrieve 5.x file with Pervasive PSQL v9 or newer.
- Opening a file who's access has been compromised by another application.

The first three are easy enough, so let me explain the last one.  If you have multiple Pervasive versions on the network, it is possible that one engine will open the file and lock out other engines.  Ideally, you should ALWAYS use the same engine (preferably the one on the server) to access the database files.

Another possibility, which is more likely if the problem is random, is that an Anti-virus application is scanning the file when it is closing, and then the application tries to re-open it again.  Since the file is in use for the duration of the scan, the database engine only gets ReadOnly access rights when it tries to access it.  Change your AV program to NOT scan database files.

A third possibility is that they are running a backup operation at the same time as using the files.  Backup packages often open files in "DENY_WRITE" mode, so that they can get a clean snapshot.  If the database tries to open the file when the backup is running, it again gets ReadOnly mode.  See www.goldstarsoftware.com/press.asp for a white paper on getting proper Pervasive backups with users in the system.

Simple Solution when it occurs:  Reboot the server.
Less intrusive solution:  Use the Pervasive Monitor to check the engine to see if the file is open in ReadOnly mode.  (Microkernel/Active Files, then check left side.)  If it is, you will see a list of users on the right side that are in the file.  Get those users out so that the file closes.  Then, allow those users back in.

The PSConfig tool (www.goldstarsoftware.com/psconfig.asp) has an automatic feature that can clear all users who have a given file open, which would automate this process for you for PSQL2000i and newer databases.  However, it sounds like you just need to know how to prevent it.

Author Comment

ID: 21032327
Couple conclusions we have come to.  We had the user log in through Citrix and didnt get this error.  She also prints to file first now and then goes and prints her reports without the error.  Could it have been some sort of print issue where the file she was printing to was seeing her as trying to write to a read only file?
LVL 29

Expert Comment

by:Bill Bach
ID: 21032529
After changing multiple parameters to the problem, you cannot determine which change fixed it.  Could be the use of the Citrix box.  Could be rights of the logged in user.  Could have been conflict with an older Btrieve/Pervasive engine on the workstation.  Could have been related to printing (though I doubt it).

You'd have to go back to the original situation, duplicate the issue, and the change ONE variable at a time to really figure it out.  If it's working now, it's probably not worth worrying about.

Author Comment

ID: 21032577
We have her going though Citrix and printing to file as a workaround but not as a fix.  I would still like to know if its a printer issue or the Btrieve.

LVL 29

Expert Comment

by:Bill Bach
ID: 21032933
Status 46 is definitely a Btrieve issue.  Of course, the application could be sending temporary data to a Btrieve file WHILE printing and getting the 46.  Duplicate the problem, then see "less intrusive solution" above and start there.  Let me know what you see.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Get the source code for a fully functional Access application shell with several popular security features that Access VBA application developers desire, but find difficult or impossible to figure out how to code. You get the source code for managi…
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question