Saving field information in a Microsoft Access database

A common practice is to extract data from Kofax ReadSoft Invoices and put it in a relational database so that you can access it with tools such as report writers or Microsoft Excel. This example shows how to store information in a Microsoft Access version 8.0 database (.mdb) file. It was created using Microsoft Visual Basic version 5.0 (VB5).

In this example, information from each interpreted field is saved in a database table as Interpret processes invoices. The information includes which invoice profile the field is associated with, the name of the field, the interpreted value, and the field status.

Overview

This example has two event handlers using the internal VBA engine, as well as one event handler running in an external event server object. This latter event handler is responsible for the database communication. The database is a Microsoft Access version 8.0 (.mdb) database.



The database contains one table called "Field" with the following columns:

Field Name

Description

Id

An indexed auto-number field

InvoiceName

A string containing the name of the current invoice

Name

The name of the interpreted field

Value

The interpreted value of the field

Status

The status of the field

The VB5 implementation is used as an external event server object for database connectivity, because the internal VBA engine lacks support for this. VB5 was chosen because Microsoft's database access objects (DAOs) make it very easy to create ActiveX servers and communicate with a variety of databases.

Related topics

Step-by-step implementation