Run the Application (dbExpress Tutorial)

From RAD Studio
Jump to: navigation, search

Go Up to Tutorial: Using dbExpress to View and Update Databases in an Application

Build the application and fix any compilation errors. Run the application and you see this dialog:


Click in the TComboBox in the upper left to display a list of all connections that are listed in Data Explorer. You should have already created at least one database connection in Connect to a Database. As previously noted, only connections that end in the string "CONNECTION" are listed.

In this example, we choose an InterBase connection to a database that is installed with RAD Studio, employee.gdb. Handling the selection of a connection was described in Combo Box Entry Selection.


After selecting the connection, the TListBox shows all the connection's tables. The TListBox was populated by PopulateListBox, described in PopulateListBox.


Double-click one of the tables to display table data in the TDBGrid. Handling a table selection was described in Selecting the Table. Table data displays and the TDBNavigator can navigate the data.


Click one of the fields in the TDBGrid to display the field data, as described in Clicking on Table Cell and Add Cell Viewing Form.


You can modify the SQL statement in the TEdit labeled SQL: then check the Open TCheckBox to execute the statement, as described in Open Check Box Click and Change in SQL Command. Note that the TDBGrid now contains only the two columns specified in the SELECT statement.


Finally, if you modify a table cell's data in the TDBGrid, you can click the Apply Updates TButton to change the database. Database updating was discussed in Add Database Components and Apply Updates Button Click.


Add Cell Viewing Form

See Also