Work with SQL Statements
|
|
Use SQLEditor to create, view, and manage SQL statements that XLiRAD templates use for retrieving data from and posting data to the database. The SQLEditor window provides access to the menu commands and toolbar buttons used to accomplish these tasks.
Find Templates Based on a Statement
Create a New Statement with the SQL Wizard
Create a New Statement "From Scratch"
For a visual reference to the database schema, display the Database Layout window while creating a new query. |
Keep the Database Layout dialog box displayed while creating or updating queries as a reference to the database schema. |
Use the following user-interface elements of SQLEditor to create and manage SQL statements in XLiRAD:
For information about dialog boxes presented when you work with SQLEditor, see:
The window also provides access to functions through toolbar buttons, window menus, and a shortcut menu.
SQLEditor displays statements stored on the server at the time you start SQLEditor. If other users subsequently create new or modify existing statements on the server, you can update the SQLEditor window to display the latest set of statements by means of the Refresh SQL button or the Refresh List command on the Query menu.
|
Icon |
ToolTip |
Same as this command |
|
|
ID Sort |
By ID Number on Sort menu |
|
|
DB Sort |
By Database Name on Sort menu |
|
|
Keyword Search |
Keyword Search on Sort menu |
|
|
New SQL |
Add New Query on Query menu |
|
|
Update Query on Query menu | |
|
|
Delete Query on Query menu | |
|
|
Search Templates |
Template Search on Query menu |
|
|
Refresh SQL |
Refresh List on Query menu |
|
|
DB Layout |
Database Layout on Query menu |
When you right-click a statement in the SQLEditor window, the following commands become available.
|
Option |
Description |
|
Clone |
Creates a new statement identical to the one selected. |
|
Copy |
Copies the selection to the Windows Clipboard. You can paste it into another application or use it the copied data when working with other statements. |
|
Update |
Identical to the Update Query menu command and the Edit SQL toolbar button. |
|
Delete |
Identical to the Delete Query menu command and the Delete SQL toolbar button. |
|
Menu name |
Description |
|
Use to close the SQLEditor window. | |
|
Use to modify the way that SQLEditor displays statements or to locate statements using search criteria. | |
|
Use to add, modify, or delete SQL commands, find the templates that use a particular statement, update the display as statements change on the server, and view the tables and fields used in a particular database. |
|
Command name |
Description |
|
Exit |
Closes the SQLEditor window. |
|
Lists statements in numeric order by command ID. | |
|
Groups statements according to the database used. | |
|
Highlights statements that contain a text string you define (does not support wild-card searches). | |
|
When clicked, restores original display of listing before the search (without highlighting). |
|
Displays the Command Editor dialog box where you define a statement "from scratch" or by means of the SQL Wizard. | |
|
Displays the Command Editor dialog box where you can edit a statement. | |
|
Displays a dialog box where you can choose to delete a statement. | |
|
Displays a window that shows the templates that include the selected statement. | |
|
Updates the listing with new statements available on the server, if any. | |
|
Displays the names of tables and fields in a database, along with field data such as record length and the acceptability of null values. |
XLiRAD Client Login Dialog Box Help
Use the XLiRAD Client Login dialog box after you install SQLEditor or TemplateMaker and every time you start the program.
|
Option |
Description |
|
Server Name |
Displays the name of the currently defined server computer. Type the name of your server or use the up or down arrow button to find the server name in the drop-down list box. |
|
Server Port |
Displays the currently defined port used for communicating with the DBServer installation. |
|
Username |
Type the user name assigned by your administrator. |
|
Password |
Type the password assigned by your administrator. |
|
Cancel |
Click this button to exit the dialog box without saving changes. |
|
Test |
Click this button to test the server port connection. |
|
Submit |
Click this button to save changes and complete the connection to the server. |
Group Selection Dialog Box Help
Use the Group Selection dialog box to choose the SQL command group you want to use.
|
Option |
Description |
|
Group |
Displays the groups available to the current user, in alphabetical order. Click the down arrow to search for additional groups available for the user. |
|
Submit |
Click this button to communicate the selection to the server and to display the SQLEditor window. |
|
Cancel |
Click this button to exit the dialog box. |
Command Editor Dialog Box Help
Use the Command Editor dialog box to create a new statement in SQLEditor either manually or using the SQL Wizard.| Construction | |
|
SQL Statement |
Displays the text of the existing statement. Change the text as appropriate. |
|
Command ID |
Contains the number that identifies this statement. Type a new number for this statement. |
|
Add Form Data |
Click this button to display the Form Variable Specification dialog box to specify variable names and types that the user can submit in a form on the HTML page. |
|
SQL Wizard |
Click this button to start the SQL Wizard. |
|
Database |
Displays the database queried by this statement. Use the up or down arrows in this list box to change the database name as appropriate. |
| Testing | |
|
Field |
Displays the name of a field contained in the statement. |
|
Value |
Contains the value you want to assign to the field in the statement. |
|
Query Output |
Displays test results or error messages. |
|
Refresh |
Click this button to restore the statement saved on the server and overwrite manual entries. |
|
Execute |
Click this button to run the statement with the test data. |
|
Cancel | Click this button to discard changes and restore the existing statement. |
|
Submit |
Click this button to save the changes to the statement. |
Form Variable Specification Dialog Box Help
Use the Form Variable Specification dialog box to specify in a SQL statement the data that a user can submit in a form on the HTML page.
|
Option |
Description |
|
Variable Name |
Type the name of the variable that identifies data you want to retrieve from or post to the database in the SQL statement. |
|
Variable Type |
Use the up or down arrows to find the type for the variable as appropriate. The options available depend on the variable types supported in the database. |
|
Cancel |
Click this button to discard changes and close the dialog box. |
Use the Database Layout window to view the tables and fields in a database. This information is useful in working with SQL statements.
|
Option |
Description |
|
Database |
Displays the database for the selected statement. Use the up or down arrows to find a different database. |
|
Tables |
Displays the tables defined in the selected database. |
|
Field |
Displays the fields defined in the selected database. |
|
Type |
Displays the type of values supported in this table field. |
|
Length |
Displays the length of this table field. |
|
Number |
Displays 0 if this table field does not support a null value or 1 if it does. |