Pervasive logo

Prev Advanced Operations Guide Next

Function Executor Tasks


The Function Executor tasks are grouped into the following categories:

Starting Function Executor Tasks

To start the Win32 Function Executor utility:

  1. Click Start4Programs4Pervasive.SQL V84Other Utilities4Function Executor.
    • Alternatively, you can access the Function Executor from within the Pervasive Control Center. Click on Tools and select Function Executor.
  2. The main window (Figure 12-2) appears.

     
    Figure 12-2 32-bit Function Executor Main Window

To start the Win16 Function Executor utility

  1. Find the \bin directory where Pervasive.SQL is installed.
  2. Run wbexec.exe.
  3. The main window (Figure 12-3) appears.

     
    Figure 12-3 16-bit Function Executor Main Window

Performing Operations Tasks

Because Btrieve provides many operations, this chapter cannot explain them all. The following sections discuss some common operations as well as some new ways of performing them with the Win32 Function Executor.


Note
In the Win16 Function Executor, to perform an operation, specify values for the appropriate controls and click Execute. In the Win32 Function Executor, selecting options from all menus performs the intended operation immediately. It does not fill in the grid and wait for you to execute the command as the Win16 Function Executor does. Also, closing the form in the Win32 Function Executor closes each open file. This is new; the Win16 Function Executor forces you to do the close operation manually.

General Operations-Related Tasks

For other tasks, see these sections:

To get help for a status code

  1. When a status code is received using the 32-bit Function Executor, it is displayed on the status bar of the open file.

    Move your mouse so it hovers over the status code that is displayed in red.

     
    Figure 12-4 Status Code Received

  1. If you click on the status code indicator, the full documentation for the status code is displayed as shown in Figure 12-5.

     
    Figure 12-5 Status Code Documentation

Opening a File Tasks

To open a data file with the Win16 Function Executor:

  1. Select Open (0) from the List box or enter 0 in the Current box.
  2. Enter the path of a data file in the Key buffer.
  3. [Optional] Enter the owner name into the Data buffer.
  4. [Optional] Enter the Open Mode into the key number.
  5. Click Execute or press Enter.

To open a data file with the Win32 Function Executor:

  1. From the File menu, select Open. The following dialog box appears:

     
    Figure 12-6 Open Btrieve File Dialog Box

.


Note
Client ID: If you have Use disabled, the Function Executor will use a BTRV() function call. If Use is enabled, it will use a BTRVID() function call for each operation you execute on this file. With Auto enabled, the Function Executor will generate a client ID for you. If you have Auto disabled, then you may enter values manually.

  1. Click Browse.
  2. Double-click on the desired filename.
Other Ways to Open a File with Win32 Function Executor

1) You can drag a file from Windows Explorer or from an operating system folder view into the Open dialog. This step fills in the filename for you.

2) You can drag one or more files into the main window.

3) After opening one file (so you have the editor window available), you can use the OpCode 0 to open another file. The file will appear in a new window.

4) You can run Function Executor from the DOS command line and specify a list of filenames to open. For example, you could use the following command line to open two files from the DEMODATA sample database:

WBExec32 person.mkd billing.mkd 

You can even use wildcard characters, as in the example:

WBExec32 *.mkd 

Running this command allows you to associate file extensions (types) with Function Executor. For example, you can associate MKD, BTR, DAT, or any other extension with Function Executor. Thus, when you double-click the file in Explorer, it automatically opens the file with Function Executor.

Creating a Btrieve File Tasks

There are two options in creating a Btrieve file with the Win32 Function Executor. If a file is already open, you can clone it; otherwise you can start from scratch.

Method 1: Using a current file as a template
  1. From the File menu, select New. The following dialog box will appear:

     
    Figure 12-7 Modify File Definition Dialog Box

  1. You can manipulate keys from this dialog as well. You can Add, Create, or Insert Segments from the Key menu. You can also save the new file as a description for use with BUtil create. Select Save As Desc and indicate the name and location where you would like the file saved.
  2. To create the file, click Create. This will open the file and display a message indicating success.
Method 2: Creating a new file from scratch
  1. Click the Create icon on the main toolbar; or, if no file is open yet, you may click File and then New, as before.
  2. If a file is already open on screen, a drop down box will appear. Choose Create New File from Scratch.
  3. The same dialog as before will appear, but it will be blank - allowing you to input brand new values.
  4. Start by adding a new Key using the Key menu - or press Ctrl-A.
  5. Fill in the attributes for the key in the lower section of the dialog.
  6. Continue adding or removing new keys and segments as desired, using the menus or right-clicking on the key in the list.
  7. Now click the Create button to execute the B_Create (14) operation. This will automatically open the file on screen as well.

Login Tasks

These procedures will be completed in a later release.

File Statistics Tasks

These procedures will be completed in a later release.

History Tasks

The following tasks are related to the History feature:

To display the History window

  1. Click View4History or click the History button.

To toggle the docking status of the History window

  1. If the History window is not visible, display it. (see To display the History window).
  2. In the history items window, right-click on the display and check or uncheck the Docked selection as shown in the following figure:

     
    Figure 12-8 Undocking the History window

  1. When docked, the History window is connected to the application window as shown in Figure 12-8. When not docked, the History window is a distinct window. When undocked, the History window has menu items that duplicate the commands seen from the right-click menu in Figure 12-8.

To toggle the Always On Top status of the History window

  1. If the History window is not visible, display it. (see To display the History window).
  2. This feature only applies to the History window when it is in the undocked state. (see To toggle the docking status of the History window)
  3. In the history items window, right-click on the display and check or uncheck the Stays On Top selection.

To reset the History window to default settings

  1. If the History window is not visible, display it. (see To display the History window).
  2. In the history items window, right-click on the display and select Settings 4 Defaults.


Prev
Function Executor GUI Reference
Contents
Up
Check for Revisions
Next
Adding Relational Access to Btrieve Files