Access Denied Error Occurs When Writing Data to Sage 300 CRE

Applies To

  • Office Connector Write
  • Forecast
  • Integrator

Background
The above applications utilize the Sage 300 CRE ODBC driver to update information in the Sage 300 CRE database. The Sage 300 ODBC driver works in conjunction with the Pervasive database server to carry out these operations.

Symtom
When attempting to perform the following operations, an error is reported by the software:

  • Office Connector Write - Send Data to Sage 300 CRE
  • Forecast - Post
  • Integrator - Perform Modifications (for Vendors, Commitments, Commitment COs)
Upon examining the error log, an entry with the following text is shown:

I/O Error. Pervasive status code 46. Access to the requested file is denied.

Cause 1
When Sage 300 CRE is installed on a workstation, the Pervasive software is installed. With the Pervasive software installed, the workstation is capable of operating as a Pervasive database server and is also capable of connecting to a Pervasive database server. When a Pervasive database server accesses the Sage 300 CRE data files, the files being accesses are locked and regarded as read-only. If the workstation is operating as a Pervasive server (and assuming the actual Pervasive server is operating), the Pervasive server operating on the workstation will see that the data files are read-only (because they are being accessed by the actual Pervasive server). Any attempt to write data will result in Pervasive status code 46 which indicates that a Pervasive data file is read-only and cannot be updated.

Resolution to Cause 1
Assuming the above scenario is what is taking place, the issue can be resolved by changing the Pervasive configuration of the workstation so that it operates as a workstation and not as a server. To do this, follow these steps:

  1. On the workstation, close all Event 1 and Sage applications (or any applications which might be utilizing Sage data).
  2. Click the Start menu, navigate to the Pervasive PSQL program group, and click PSQL Control Center & Documentation
  3. In the pane on the left, navigate down to Pervasive SQL / Local Client / Microkernel Router.
  4. Right-click on Microkernel Router and click Properties.
  5. Under Access, uncheck the Use Local MicroKernel Engine box.
  6. Check the Use Remote MicroKernel Engine box is checked (if not already).
  7. Click OK

Cause 2
Pervasive status code 46 indicates that a file is flagged as read-only. If this is the case, users on other workstations will encounter problems writing data from both Sage and Event 1 applications.

Resolution to Cause 2
Using Windows Explorer, navigate to the folder containing the Sage 300 CRE data files. Right-click on files in this folder (and sub-folders) and confirm that the files do not have the Read Only attribute marked. If so, uncheck this attribute.

Cause 3
Pervasive status code 46 indicates that a file is flagged as read-only. This can occur if the current user does not have sufficient file permissions to update the files..

Resolution to Cause 3
Using Windows Explorer, navigate to the folder containing the Sage 300 CRE data files. Examine the security settings for the files in this folder and confirm they are set to allow the user in question to update. Consult with your Sage 300 CRE support representative for assistance with understanding the required file permissions for Sage data files.

For further assistance with this issue, please consult with your Sage 300 Construction and Real Estate support representative.