Using SQL Command to Execute Scripts

Previous Next

The SQL Command option allows you to create and execute SQL scripts. The advantage over similar tools (SQL*Plus, I-SQL) is that the SQL option has the conceptual processor check all SQL statements before executing them.

NOTE:

You can only execute SQL scripts after your application tables have been physically created in the database.

Within a script, you can use any action supported by USoft Developer. This action must then be preceded by the ACTION keyword. For example:

action WindowCreate('Info Window', 'Computers')

To execute scripts using SQL Command:

1. From the menu bar, choose Tools, SQL Command. The SQL Command dialog appears.
2. Type your SQL statements in the upper box, or click Open to work on an already existing script.
3. When you are finished, click Execute to execute your script. The SQL Parser will check your statement(s), and report its findings in the lower box. If you wish to save this report, click Save or Save As.
4. If your script is correct, you may click Create to have USoft Developer create a window based on your script.

This window only contains the information (tables, columns, computed results, etc.) specified in your script. You can use this window to query, insert, or update data with all the features of a graphical user interface.

This window can also be designed. See Windows Designer help topic: "How to Design Info Windows Created from SQL Command".

5. To save your script, click Save or Save As. A dialog will appear, prompting you to specify the filename to be used.
6. Specify the filename, then click OK.
7. To exit the SQL Command window, click Cancel, or double click the window's System-menu button.

NOTE:

You can start a script that has previously been saved as a file, by using the Start command in the upper box of the SQL Command dialog. The syntax is:

start <filename>

Related Topics

How to Configure SQL Command