Featured Post

Applying Email Validation to a JavaFX TextField Using Binding

This example uses the same controller as in a previous post but adds a use case to support email validation.  A Commons Validator object is ...

Sunday, December 19, 2010

Solving a File Access Mode Error

As a Java guy, I'm conditioned to allow the JVM or an app server to handle freeing up resources. With Pervasive Data Integrator, you may have to take care of this yourself. I recently generated a "File access mode" error in a process on a RIFL FileRename() function. I verified all of the file arguments, but the error persisted.



FileCopy() worked fine, so I figured that the problem was with a DJImport object I was using which was the source of the FileRename() object. The DJImport was in a subprocess and appartently wasn't being freed when the subprocess finished. I set the DJImport object to "Nothing" in the end step and the problem went away.

In RIFL, the correct way to handle a DJImport object used throughout a subprocess is



' in Process Variables
' imp As DJImport

' in the start step
Set imp = New DJImport "Excel XP"

' in the end step
Set imp = Nothing


This post is replicated from http://my.opera.com/walkerca/blog/2010/12/18/solving-a-file-access-mode-error.

No comments:

Post a Comment