Project Notes


Project: Locating data with the LocatorControl
Description
This sample application includes files that demonstrate use of a LocatorControl for performing interactive searches in an application. See the "Locating data with the LocatorControl" topic in the Database Application Developer's Guide for steps on creating this application.

This application shows how to set a particular column for the locate operation as well as using a TextFieldControl component to prompt the user for the column to locate in.

This application requires that you have a version of JBuilder that includes the JBuilder DataBroker database architecture components.

Note: All versions of JBuilder provide direct access to SQL data through the JavaSoft JDBC API. Some versions of JBuilder provide additional DataBroker components (on the Data Access tab of the Component Palette) that greatly simplify RAD visual development of database applications. Refer to the JBuilder product page from the Borland Web site for availability of features in each JBuilder version.


Before you can run this application, install and set up Local InterBase Server and the sample data source as described in Installing and setting up in the Database Application Developer's Guide.

When you run the application, you'll notice the following behavior:

  • Enter the column name that you want to perform the locate on in the TextFieldControl. Press

    Enter

    Note: In this sample, there is no validation of the column name, so be sure to enter a correctly spelled column name.

  • Start typing the value to locate in the LocatorControl. If you're locating in a String column, as you type, notice that the LocatorControl does an incremental search on each key pressed. For all other data types, press Enter to perform the locate.

  • Press the UpArrow or DownArrow keys to perform a "locate prior" or "locate next" respectively.