![]() | ![]() |
Home |
|
|
SQL Advantage User's Guide |
|
| Chapter 1: Introduction |
|
| SQL Advantage Session Windows |
SQL Advantage may have zero, one, or more documents open at any given time, each having its own session window. Each new session window (see Figure 1-1) has a query window pane, where you enter your query scripts; and an associated message window pane, located below the query window pane. The message window pane displays query execution errors and informational messages. The message window pane is hidden if the splitter bar is pulled all the way down, and the query pane is hidden if the splitter bar is pulled all the way up.
Each session window may or may not have connection to a SQL Server. You can start editing a script in the query window pane without having a connection to a SQL Server. You can create and execute T-SQL queries (scripts) from the query window pane.
After you execute your queries, results are displayed in separate result windows (see "SQL Advantage Result Windows").
Note: Fatal communication errors and unexpected internal errors are displayed in alerts, not in the message window pane.
Figure 1-1: SQL Advantage Application and Session windows
SQL Advantage has the following application and session window indicators and controls:
Note that menus in the SQL Advantage menu bar have one letter underlined; this is a mnemonic key that you can use, in combination with the Alt key, to select that menu should you not have a mouse.
For example:
Similarly, most menu commands have one letter underlined that you can use to invoke that command after the menu has been selected. Also, some menu commands have short-cut accelerator keys that you can use to invoke the command. Where applicable, these short cut accelerator keys appear to the right of the command in the menu.
The application window control menu is a drop-down menu displayed when you click the mouse button in the close box in the top left corner of the SQL Advantage application window (see Figure 1-1).
The application control menu has the following commands:
Reading from left to right across the menu bar (see Figure 1-1), SQL Advantage has the following menus:
The File menu has the following commands:
Note: Opening a new session window does not automatically establish a SQL Server connection.
SQL Advantage remembers the last selected type of file in the current application.
Up to four of the most-recently, worked-on files are listed at the bottom of the File menu. You can quickly reopen any of these files by clicking the file name.
You can also quickly open any of your saved SQL Advantage files by double-clicking the appropriate filename in the File Manager.
Note: To open a saved SQL Advantage file by double-clicking a filename in File Manager, you must establish an appropriate association for each type of SQL Advantage file (*.sql, *.txt, and *.rpt).
Closing a session window disconnects the connection to SQL Server, if any. If a query session is in progress, you are prompted to cancel that query before closing.
When closing a result window, if you set your preferences to do so, you are prompted to save first.
You can also close a window using the window's control menu. If SQL Advantage has no query sessions or result windows open, this command is disabled.
For result windows, saves the contents and font to a specified filename. You can save the file as:
If the specified <filename> already exists, a prompt asks you if you want to overwrite it.
A saved grid result window is reopened as a grid window. Its formatted options are saved with the result file.
The first time you save a window to a file, the Save As dialog box opens to prompt you to specify the file name; thereafter, the file is saved immediately with no dialog prompt. To save an existing script or set of results under another name, choose Save As... from the File menu.
If SQL Advantage has no query or result windows open, or if no changes have been made since the window was last saved, the Save command is disabled.
For query windows, you can save the file as:
For result windows, you can save the file as:
If the specified <filename> already exists, a prompt asks you if you want to overwrite it.
In the Save As dialog box, select the file type from the Save File As Type drop-down list. Note that this list is dependent upon the type of window that is currently active.
If SQL Advantage has no query or result windows open, the Save As... command is disabled.
Set your session or global preferences in each of the following four categories:
Session preferences are disabled if the window having focus is not a session window.
You can print:
Note: For a result window in grid output mode, you can print only the complete contents of a single cell (that is, partial contents of a cell are not allowed) or the complete contents of a contiguous group of cells, rows, or columns.
The Edit menu has the following commands:
If you click or select text in the message window pane, this command changes to the Clear All Messages command which removes all messages displayed in the message window pane.
The View menu has the following commands:
When you choose the Edit Cell... command, the Edit Cell dialog box opens to let you edit the full contents of the selected cell. You must click OK to accept your editing changes, or cancel the edit cell operation before you can perform any other work. Edited results cell content is for your information purposes only; it does not alter data in the database.
The pick lists are sensitive to the current session window's database connection and the Tables and Columns, Views and Columns, and Stored Procedures pick lists update themselves when the connection changes. The pick list subcommands are enabled only when a query window is open and has focus, and you are connected to a SQL Server. Pick lists are not enabled when a result window has focus, if the session window is minimized, or if there is no connection to SQL Server.
Note: T-SQL Commands Syntax and System Procedures Syntax pick lists are disabled if not connected to SQL Server release 10.0 or later, or if the sp_syntax stored procedure is not fully installed on the SQL Server to which you are connected.
The Server menu has the following commands:
If you choose Connect while connected to a SQL Server, you are prompted to disconnect from the current SQL Server before connecting to a different SQL Server, or the same one again.
Note: Before disconnecting, you must cancel any executing queries.
The Query menu has the following commands:
This command executes the script in the query window pane. SQL Advantage submits the script to SQL Server for execution. The current SQL Advantage session then waits for SQL Server to process the script. If there is no connection to SQL Server, you are prompted to connect before execution can happen.
This command is disabled if:
The first item in the list (the most-recently recorded) is initially selected. This command is disabled if a session window does not have focus or if there is no connection to a SQL Server.
The Window menu has the following commands:
The Help menu has the following commands:
To display a particular topic from the list of topics, select it and then click Go To.
To quickly search for information in the online help system, open the Search dialog box.
SQL Advantage has a toolbar that provides quick access to some SQL Advantage menu commands (see Figure 1-2 and Table 1-1).
Toggle the toolbar display on and off by choosing Tool bar from the View menu. When the toolbar is displayed, a check mark appears beside this command.
Note the SQL Advantage toolbar follows standard Windows behavior as described in the Microsoft Windows User's Guide.
Figure 1-2: Toolbar
When you position the mouse cursor over a toolbar command button, and wait 2 seconds or more before you click a mouse button, a one- or two-word message describing that command is displayed in a tooltip over the command button. An expanded microhelp description is also displayed in the application window status bar (see Figure 1-4):
Command | Description | For more information... |
|---|---|---|
New | Same as the New command in the File menu | See "File Menu" |
Open | Same as the Open command in the File menu | See "File Menu" |
Save | Same as the Save command in the File menu | See "File Menu" |
Same as the Print command in the File menu | See "File Menu" | |
Preferences | Same as the Preferences command in the File menu. If a session window has focus when you invoke this command, you can set preferences just for the current session. If a session window does not have focus when you invoke this command, you can set global preferences which are retained between sessions. | See "File Menu" |
Undo | Same as the Undo command in the Edit menu | See "Edit Menu" |
Cut | Same as the Cut command in the Edit menu | See "Edit Menu" |
Copy | Same as the Copy command in the Edit menu | See "Edit Menu" |
Paste | Same as the Paste command in the Edit menu | See "Edit Menu" |
Find | Same as the Find command in the Edit menu | See "Edit Menu" |
Execute | Same as the Execute command in the Query menu | See "Query Menu" |
Cancel Execution | Same as the Cancel Execution command in the Query menu | See "Query Menu" |
Change Database | Lists all the available databases from the current session's connected SQL Server. To quickly change from one database to another within a connected session to SQL Server, select the appropriate database name from the drop-down list box. | See "Changing Database". Note that changing database changes the context of the first three pick lists in the View menu. For more information, see "Using the Tables and Columns Pick List", "Using the Views and Columns Pick List", and "Using the Stored Procedures Pick List". |
The application window Minimize command button (see Figure 1-1) reduces the SQL Advantage application window to an icon on the desktop. This command button performs the same function as the Minimize command in the application control menu.
The application window Maximize command button (see Figure 1-1) enlarges the SQL Advantage application window to full screen size. This command button performs the same function as the Maximize command in the application control menu.
When the application window is maximized, the Maximize command button (see Figure 1-1) changes to the Restore command button. Clicking the Restore command button restores the SQL Advantage application window to its previous screen size. This command button performs the same function as the Restore command in the application control menu.
The session window control menu is a drop-down menu displayed when you click the mouse button in the close box in the upper left corner of the SQL Advantage session window (see Figure 1-1).
The session control menu has the following commands:
The session window Minimize command button (see Figure 1-1) reduces the SQL Advantage session window to an icon within the application window. This command button performs the same function as the Minimize command in the session control menu.
The session window Maximize command button (see Figure 1-1) enlarges the SQL Advantage session window to full size within the application window. This command button performs the same function as the Maximize command in the session control menu.
When the session window is maximized, the Maximize command button (see Figure 1-1) changes to the Restore command button. Clicking the Restore command button restores the SQL Advantage session window to its previous screen size. This command button performs the same function as the Restore command in the session control menu.
The session window status bar (see Figure 1-3) located at the bottom of the session window (see Figure 1-1) displays the following current session status:
Figure 1-3: Session window status bar
When the display mode for the result window is Grid, SQL Advantage displays the word Grid on the status bar. When the display mode is set to Text output, SQL Advantage displays the word Text. If SQL Advantage is started from the command line with the -o option, it displays File:<filename>.
The application window status bar (see Figure 1-4) at the bottom of the SQL Advantage application window displays toolbar and menu command microhelp messages and keyboard lock key status.
To toggle the display of this status bar on and off, choose Status bar from the View menu. This is only if there are no session windows open, or if a result window has focus, otherwise, it toggles the session window status bar. When the status bar is displayed, a check mark appears beside this command.
Figure 1-4: Application window status bar
|
|