Create or Add a CursorAdapter Class Library

To enjoy all the benefits of VPME’s fully- active data dictionary, you must set up your CursorAdapter classes in the VPME Data Builder. You can create new CursorAdapter classes in the Data Builder or add existing CursorAdapter classes to the Data Builder.You set up your cursor adapter classes by entering property values into the Data Builder for the CursorAdapters and CursorAdapter fields.

To set up your CursorAdapter classes in the Data Builder, you will need at least one class library to hold them. Therefore, the first step in setting up CursorAdapters in the Data Builder is to use the Data Builder to create a new class library or to add an existing class library to hold your CursorAdapter classes.

Tip: While you only need one class library to hold your CursorAdapter classes, you may want to use more than one class library to keep your CursorAdapter classes organized by categories that are applicable to your application. For example, in a business application, you may want to use class libraries that organize the CursorAdapter classes by the type of data they access. You might then have separate class libraries for Company, Employees and Product data.

Ø To Create or Add a CursorAdapter Class Library

1.   Select CursorAdapter Libraries: Open the Data Builder and select CursorAdapter Libraries in the treeview on the Data Builder List page.

2.   Create or Add: With CursorAdapter Libraries selected, click the New button to create a new class library or the Add button to add an existing class library.

3.   Create New: VPM Enterprise displays the Save As dialog if you are creating a new class library. Enter the name you want for your new class library in the Library Name box and click Save.

Tip: If the CursorAdapters that you are creating will be based on tables from the same database, or data source, you may want to use the database name for your new class library name. Therefore, we are giving our CursorAdapter class library the name “Northwind”, which is the name of the MS Access database that contains the tables we will be using.

4.   Add Existing: VPM Enterprise displays the Open dialog if you are adding an existing class library. Use the Open dialog to locate the existing class library and to enter its name in the Add Library box. Click Add.

Tip – Existing CursorAdapters: If a class library you add to the Data Builder contains CursorAdapter classes, the CursorAdapter classes are automatically added to the Data Builder as well. However, you will need to “set up” the CursorAdapters in the Data Builder. See Adding CursorAdapters.

After you create a new CursorAdapter class library or add a CursorAdapter class library to the Data Builder, you will see the name of the class library in the treeview under CursorAdapter Libraries on the Data Builder List page.

 

More:

Creating and Setting Up CursorAdapters