Go Up to Utilities (FireDAC)
This topic describes the FireDAC Explorer utility.
FDExplorer, the FireDAC Explorer, is a hierarchical database connection browser with data editing and SQL script execution capabilities. FDExplorer is comparable to the BDE Database Explorer.
You can launch the FDExplorer utility, which is a stand-alone program, from the RAD Studio IDE by using Tools > FireDAC Explorer.
FDExplorer enables you to:
- Manage FireDAC default parameters.
- Create, edit, load, and save connection definition files.
- Create, edit, and delete connection definitions.
- Browse database-specific schema objects, including tables, fields, indexes, primary keys, stored procedure definitions, or triggers.
- View, append, and edit data in existing tables.
- Create, edit, load, save, and execute SQL scripts to query, alter, test, and deploy a database.
Also, the FDExplorer utility can be invoked at design-time using popup menu for TFDConnection component
Managing Default Parameters
Select the Connection definitions tree item to manage FireDAC default parameters:
- Connection definition file--default name of the connection definition file.
- Driver configuration file--default name of the driver configuration file.
If the specified values are default values for your workstation, the check box is selected. You can edit parameter values and select the check box to save the new values. They will be stored in the registry key
Managing Connection Definition Files
When you run FDExplorer, it opens and shows the content of the default connection definitions file. Use buttons or main menu items:
- New ConnDef File: Creates a new empty connection definitions file.
- Open ConnDef File: Opens an existing connection definitions file.
Managing Connection Definitions
To manage connection definitions in the current open connection definitions file, use the toolbar buttons on the Objects Explorer pane:
- Connection Definition (Ctrl+N): Creates a new empty connection definition.
- Delete the current object (Ctrl+Del): Permanently deletes the currently selected connection definition.
- Open current object (or click on plus sign in tree): Activates a connection to the database using the currently selected connection definition.
- Close current object: Closes the connection to the database.
- Rename current object (Ctrl+M): Renames the currently selected connection definition.
- Save changes to current object (Ctrl+A): Permanently saves changes made to the currently selected connection definition.
- Cancel changes to current object (Ctrl+Backspace): Permanently cancels changes made to the currently selected connection definition.
Editing Connection Definitions
To edit the connection definition, select it in the tree. On the right, you will see the Connection Definition Editor. It has three panes:
- Definition: Allows you to edit the main connection parameters. First, select a Driver ID from the drop-down list on top. After that, the editor becomes available for the selected driver parameters. For more information about the parameters, see FireDAC Database Connectivity. After editing, click the connection definition in the left tree again. Now the connection definition is modified, but the changes are not yet permanently stored in the connection definition file. Press Ctrl+A to store them.
- Advanced: Allows you to edit advanced connection options.
- Info: Shows all information associated with the current connection definition, including a full set of parameters and FireDAC version info. The page shows additional client and server information if the connection to the database is established.
Also, the following commands are accessible in the Connection menu:
- Run Wizard (Ctrl+W): Runs the connection definition wizard, if it is implemented for the driver. Only Microsoft SQL Server, Microsoft Access, IBM DB2, Sybase SQL Anywhere, and ODBC Bridge drivers implement the wizard.
- Test (Ctrl+T): Tries to establish a connection to a DBMS without opening a connection definition node.
- Make BDE Compatible (Ctrl+B): Applies a data type mapping schema, compatible with BDE, to the connection definition.
- Import BDE Aliases: Allows you to import BDE aliases into the current connection definitions file.
And in the Help menu:
- Help Topics (F1): Opens a help topic with descriptions of the DriverID driver parameters.
Browsing the Database Contents
To browse database-specific schema objects, including tables, fields, indexes, primary keys, stored procedure definitions, triggers, sequences, and so on, select the connection definition and open it. After that, you can drill down into the database structure. The exact set of accessible objects depends on the DBMS. To see the object metadata, select it in the tree and switch to the Info pane on the right.
To view, append, and edit data in existing tables, select the table or view in the tree and switch to the Data pane on the right. Use View > Blob Viewer or double-click in the DB grid cell to show the content (Text, Binary data, Image, HTML, and so on) of a BLOB field.
Running a Query Against a Database
To query, alter, test, and deploy a database you can use a SQL Script window. Select the appropriate connection definition in the tree and open it. Use buttons or main menu items:
- New SQL Script: Creates a new empty SQL script file.
- Open SQL Script: Opens an existing SQL script file.
In the SQL script window use buttons on the window toolbar or main menu items:
- Run Script (F9): Executes a script in full, from first to last command.
- Run Command (F7): Executes the next command from the current cursor position in the SQL script editor.
- Skip Command (Shift+F7): Skips the next command from the current cursor position in the SQL script editor.
See the FDExecutor description for a list of support scripts for execution control commands, or just press F1.