Terminating a database connection

The following code example is for an event handler that obtains the globally saved reference to the event server object, then calls DBClose ()to close down the connection to the database.

The code must be inserted into ReadSoft Invoices at the application level. Select JobStopped as the New event and enter the code using the Visual Basic window.

The event is called when all invoices in a job have been processed.

Function OnJobStopped ( ) As Long

Dim ExtServObj As Object

Set ExtServObj = Application.GetSharedObject("EHIExtServObj", 1 )

ExtServObj.DBClose

OnJobStopped = EV_OK ‘return value to Kofax ReadSoft Invoices

End Function

Related topics

Back to instructions

Overview of example