Text editor / SQL code editor

All object editors and SQL editors include text/SQL input windows. Please refer to the individual subjects for further information. For example:

A Code Insight system is included to simplify command input and database objects are underlined for easy recognition. Objects and fields can be simply and quickly dragged and dropped from the DB Explorer and SQL Assistant into the Edit page. When an object node(s) is dragged from the DB Explorer or SQL Assistant, IBExpert offers various versions of text to be inserted into the code editor.

IBExpert offers you the following choices when dragging a database node from the DB Explorer tree into any code editor: CONNECT statement, CREATE DATABASE statement, IBEBlock with the ibec_CreateConnection function. You can drag 'n' drop scripts/blocks from a registered database's object tree and from the Scripts/Blocks tree to automatically insert the source into code editors.

Use [F1] when the cursor is placed on a keyword to open the online context-sensitive help.

You can use [Ctrl] together with the mouse wheel to temporarily increase/decrease the font size of text in an active code editor.

Hyperlinks allow you to quickly reference database objects if necessary. It is even possible to convert text from/to unicode. IBExpert converts selected text parts, or, if no text is selected, the entire content of the code editor. The [Alt + X] hotkey may be used to input Unicode characters. Type the hex code of a Unicode character and then press [Alt + X] to get a character. Press [Alt + X] again to turn the character back into its hex code.

For stored procedures the parameters’ hint contains a description of the current input parameter. If there is no description specified for the current parameter – a description of the procedure itself will be displayed, if it exists.

For user-defined functions the parameters’ hint displays a UDF description, if it exists.

Implemented in IBExpert version 2020.05.10:

For the VALUES part of INSERT statements the parameters’ hint displays a description of the current field or table description.

The following options are available under Options / Editor Options / Code Insight allowing you to customize the behavior of the parameters tip:

The Quick comment feature enables you, using the [Ctrl] + [Alt] + [.] shortcut (or select the right-click menu item, Comment selected), to quickly comment the current selection of code or selected block. And use the right-click menu item, Uncomment selected or [Ctrl] + [Alt] + [,] shortcut to unselect.

Examples

(| - caret position)

56| --> Alt+X --> V --> Alt+X --> 56

4e56|  --> Alt+X --> 乖 --> Alt+X --> 4E56

There are a number of options available to customize the appearance of the code in the text editor. Please refer to the IBExpert Options menu item, Editor Options, to view and specify all options available. For example, it is possible to customize the highlighting of variables. Use the IBExpert menu item Options / Editor Options / Color to select color and font style for variables.

When closing any SQL input editor IBExpert asks by default how to treat each active transaction when you close the form. You can select your preferred default option using the IBExpert menu item, Options / Environment Options / Confirmations.

IBExpert's text editor/code editor has its own comprehensive right-click context-sensitive menu, the contents of which are described in detail in the SQL Editor Menu and IBExpert Edit menu chapters.

As with all working areas in IBExpert there are also a number of key combination shortcuts available here in the Text Editor. To view all short cuts or specify your own, use the Localizing Form (a complete list of all shortcuts and operations), opened using [Ctrl + Shift + Alt + L]. For example, a selected block of text can be simply and easily indented using [Ctrl + Shift + I] (decrease indentation using [Ctrl + Shift + U]). It is also possible to indent/unindent selected text blocks using the [Tab] and [Shift + Tab] keys for this.

The option to format selected text supports the formatting of PSQL blocks and separate DML statements only.

IBExpert also supports server built-in functions. For built-in functions IBExpert shows a tip with the number/type of parameters and a short description of the function.

A full list of Firebird error codes can be found in the Firebird 2.1 error codes documentation.