Function Executor Tasks
Function Executor tasks are grouped into the following categories:
Starting Function Executor Tasks
1
Access Function Executor from the operating system Start menu or Apps screen or from the Tools menu in Pervasive PSQL Control Center.
2
Figure 13 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 Function Executor.
*Note: 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 in previous versions. Also, closing the form closes each open file. No longer do you need to manually perform the close operation.
General Operations-Related Tasks
For other tasks, see these sections:
1
Move your mouse so it hovers over the status code that is displayed in red.
Figure 14 Status Code Received
2
Figure 15 Status Code Documentation
Opening a File Tasks
1
From the File menu, select Open. The following dialog box appears:
Figure 16 Open Btrieve File Dialog Box
.
*Note: Client ID: If you have Use disabled, 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, Function Executor will generate a client ID for you. If you have Auto disabled, then you may enter values manually.
2
Click Browse.
3
Other Ways to Open a File with Function Executor
1) You can drag a file from Windows Explorer or from an operating system folder view into the Open dialog box. 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 Function Executor. If a file is already open, you can clone it; otherwise you can start from scratch.
*Caution: In the same directory, no two files should share the same file name and differ only in their file name extension. For example, do not name a data file Invoice.btr and another one Invoice.mkd in the same directory. This restriction applies because the database engine uses the file name for various areas of functionality while ignoring the file name extension. Since only the file name is used to differentiate files, files that differ only in their file name extension look identical to the database engine.
Method 1: Using a current file as a template
1
From the File menu, select New. The following dialog box will appear:
Figure 17 Modify File Definition Dialog Box
2
You can manipulate keys from this dialog box 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.
3
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
3
4
Start by adding a new Key using the Key menu - or press Ctrl-A.
5
6
7
Now click the Create button to execute the B_Create (14) operation. This will automatically open the file on screen as well.
History Tasks
The following tasks are related to the History feature:
1
Click ViewHistory or click the History button.
1
2
Figure 18 Undocking the History window
When docked, the History window is connected to the application window as shown in Figure 18. 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 18.
1
2
3
1
2