SQL Commands


The SQL Commands page is very similar in functionality to Create Database. The difference is that you can load and save SQL scripts (files) and you can optionally set "SetTerm". When the loaded / edited script is done, it can be executed with "Execute SQL Script". Unlike the other pages, no result set is returned, only the SQL command is executed. The execution of the SQL commands uses the ZSQLProcessor component. In order to execute an SQL command, the following properties must be set:

The connection to ZConnection, in our case ZConnection1.

By default it is a semicolon and can be left this way, even if dtSetTerm has been set. The separation between individual SQL commands is a blank line in this case.

The SQL statements.

There is an SQL file named "dbdemos.sql" in the SQL directory of the application. Load them with "Load SQL Script". You can click Execute SQL Script immediately after loading and the script will run, then you can load createutf8.sql and execute Execute SQL Script. If you now access the file with Turbobird or another database tool, you will see that there are now 7 tables in our database.

It's that easy to extend a database. And Country and City also contain the supplied data

Description ZSQLProcessor

Later more ...



© CMBasic.de