EXECUTE IBEBLOCK

What is IBEBLOCK?

It is a powerful set of DDL, DML and other statements that are executed on the server and on the client side, and which include some specific constructions applicable only in IBExpert or IBEScript (excluding the free versions of these products), independent of the database server version. (This feature is unfortunately not included in the free IBExpert Personal Edition.)

With EXECUTE IBEBLOCK you will be able to:

  • Work with different connections within a single IBEBLOCK at the same time.
  • Move (copy) data from one database to another.
  • Join tables from different databases.
  • Compare data from different databases and synchronize them.
  • Populate a table with test data using random values or values from other tables or even from other databases.
  • Access external databases via ODBC drivers.
  • Transaction control across multiple databases.
  • Integration of many IBExpert functions in batch files.
  • Dispatch and receive emails.
... and much more.

The syntax of IBEBLOCK is similar to that of stored procedures but there are many important extensions.

For example:

  • You can use EXECUTE STATEMENT with any server, including InterBase® 5.x, 6.x, 7.x.
  • You can use one-dimensional arrays (lists) of untyped variables and access them by index.
  • It isn't necessary to declare variables before using them.
  • You can use data sets (temporary memory tables) to store data.
  • ROW_COUNT and ROWS_AFFECTED variables supported.
  • Code Insight also supports IBEBlock constants and functions.
  • Support of UPDATE OR INSERT.
  • Use environment variables in INPUT, OUTPUT and SET BLOBFILE statements (see IBEScript for example).
  • Use assignment statements like <variable> = <boolean_expression>. For example: bNotNull = MyVar is not null;
... and much more.

You can execute single IBEBLOCKs in the SQL Editor. You can debug them in the SQL Editor too. They are debugged in the same way as stored procedures and triggers. Also you can include IBEBLOCKs into your scripts and execute these scripts as usual - using the Script Executive or IBEScript.exe. IBEBlocks can be managed in the IBExpert DB Explorer (Script/Blocks page and Script node) and stored in the IBExpert User Database.

This documentation describes the following topics:

We strongly recommend using the IBExpert User Database as the main storage for IBExpert for security reasons (all your IBEBlocks are then stored in a Firebird database).

As this important feature is constantly being expanded and improved, some areas are still incomplete or in work. Check regularly for the latest revisions by using the What's New function in the online documentation.

Or post your question to: register@ibexpert.biz.

back to top of page
<< | IBEBlock | >>