Online Documentation for All SQLManager.net Products
|
SQL Script Editor |
|
Using the SQL Script Editor, you can view, edit and execute SQL scripts.
To call the SQL Script select the Tools | SQL Script menu item.
In the Script area you can view and edit the SQL script text. You can use quick code to fasten this process: when you type the first word symbols in the edit area, you are offered some variants for the word completion in a popup list (analogue of the Code Insight in Delphi IDE).
The popup menu of the edit area contains standard functions for working with the text (Cut, Copy, Paste, Find, Replace, Toggle Bookmarks, etc) and also functions for processing the script, which allow you to save/load script to/from file, and preview/print query.
The Object Explorer at the left of the window displays the tree of objects, used in the current script and allows you to get to the needed script fragment quickly by clicking the object in the tree.
To change the database for the script, use the drop-down menu on the toolbar. If you choose '-Don't use active connect-' then the executed script must contain statement CREATE DATABASE or CONNECT TO DATABASE.
|
SQL Script Toolbar |
|
Button |
Action |
|
|
|
|
|
Shows/hides the tree of objects, used in the script, at the left of the window. |
|
|
Creates a new clear script. |
|
|
Drops down, allowing you to load or execute a script from the *.sql file. |
|
|
Drops down, allowing you to save the current script or to save it with a new name to the *.sql file. |
|
|
Loads the script from the *.sql file and executes it. |
|
|
Runs the script for execution. |
|
|
Stops the script execution. |
|
|
Brings the window to its default size and position (restricted by the main window and DB Explorer). |
|
Databases |
Drops down with a list of connected databases, allowing you to select the database for the script. |
The results of executing the script are displayed on the Results page. This text can't be edited, but can be copied to the clipboard.
The errors in executing the script are displayed in the bottom area of the window. The popup menu of this area allows you to copy the selected error message or to copy all the error messages.
If you want the script to be aborted on errors, check option 'Abort Script on Error' in the Environment Options window on Tools: SQL Script page. In case of successful executing the script you will receive a message, informing you about the execution time.