|
This section contains the following topics:
Function Executor runs on Windows. With this interactive utility, you can learn how Btrieve operations work. (This chapter refers to operations for the transactional interface as "Btrieve operations.")
By allowing execution of Btrieve operations one at a time, Function Executor enables application developers to simulate the operations of a Btrieve application. This simulation can isolate the database calls from the rest of your application, which can help in testing and debugging your program.
Function Executor is primarily a tool for application developers. This chapter assumes that you have a basic knowledge of Btrieve operations. For more information about Btrieve operations, refer to the API Programmer's Reference that is available with the Pervasive PSQL Software Developer's Kit (SDK).
Function Executor features include the following:
The status bar contains the following elements:
|
![]()
|
The last/current status code is shown in the editor window's status bar at the bottom of the window for the open file, and appears red if the last status was not zero.
|
|
![]()
|
Placing the mouse cursor over the status code shows a description of the status and what operation caused it. You can also click on the display in red in order to display the full help for the status code. See To get help for a status code for more information.
|
|
![]()
|
When your cursor is in the input area on the main window of Function Executor, the status bar displays the offset within the buffer: the hex, the decimal, and the ASCII value of the byte you are presently on.
|
|
![]()
|
The status bar also indicates how many operations have been performed when there are multiple items in the queue. Normally this displays 1 of 1, but if you are executing multiple operations, it will display the count as the operations are executed.
|
|
![]()
|
The status bar also displays when you are in a transaction.
|
Clicking on the File Statistics icon displays a dialog box listing the currently-open file's statistics. You can print these statistics to a text file or save them to a description file usable by BUTIL -CREATE (you may also create a new blank file with the same characteristics.)

From the Get menu, you can retrieve the First, Next, Previous, and Last records in the table. The GetExt menu includes the Goto Percent, Get Position, and Find Percent commands.
The Get and GetExt commands are available from both the menu bar and toolbar. The toolbar offers Step (Physical) and Get (Logical), allowing you to move either through the natural order of the file (physical) or in a specific order (logical).
Goto Percent allows you to choose whether to jump to a point within the physical layout of the file, or down any key path, limited to the keys defined in the file. You can also set lock biases using the option buttons in the Locks group box.

Find Percentage is the opposite of Goto Percent. It tells you how far into the data you are, depending on whether you are stepping through the file logically or physically.


The Transaction toolbar lets you start, stop, and abort transactions. You can set all aspects of the Transaction API through this toolbar, and the operation is executed immediately. The Transaction status also appears on the main window status bar, since it affects all open files for the client ID.
The Login dialog box allows you to perform the Btrieve login operation via a GUI interface. See the following topics for more information about the Login dialog box:
When you perform operations using the Function Executor utility, they are recorded in a History log. You can use this log to perform the operations contained therein, or save the history as a file that you can later reload and step through.

See the following topics for more information about the History log:
When a file is open, you can right-click on any position in the buffer and select Show As. A dialog box appears in which you can view the bytes at the chosen buffer position as any data type.

Table 12-1 lists controls available Function Executor.
For each open file (see Application Window ), you have the option of performing Btrieve operations with or without the assistance of Function Executor. You do not need to make any configuration changes to use one method or the other. Whether you use automatic mode or manual mode depends on which GUI controls you use.

Note
Selections from the menus (see Application Window ) also are part of the automatic mode.
When you click a button in the automatic mode area, the following assistance is provided by the utility:
Function Executor is a valuable tool for program developers, but it assumes you have a working knowledge of Btrieve fundamentals. Refer to the following topics to understand all the features of this utility:
|
Chapter contents
Prev topic: Testing Btrieve Operations
|