This section briefly describes the menu commands in Admin Demo. For more information about the ODBC functions that are executed by many of the menu items, see the ODBC Programmer's Reference.
Command | Description |
Connect | Calls SQLDriverConnect to connect to a data source. If a new connection is made successfully, Admin Demo opens a new Connection window and adds the Connection window name to the Window menu. |
Disconnect | Disconnects from a data source. The Connection window and all Results windows for the data source are closed. The Connection window name is removed from the Window menu list. |
Execute | Executes the SQL statements found in the specified file. For more information, see "SQL Batch Files" later in this guide. |
Open | Opens the specified file and places its contents in the input pane. |
Close | Closes the current file. |
Save | Saves the contents of the input pane to the current file. |
Save As | Saves the contents of the input pane to the specified file. |
Exit | Discards pending result sets, closes open connections, and exits Admin Demo. |
Command | Description |
Undo | Reverses the previous editing operation in the input pane. |
Cut | Cuts the selection from the active input or output pane to the Clipboard. |
Copy | Copies the selection from the active input or output pane to the Clipboard. |
Paste | Pastes the clipboard contents to the current cursor location (text only). |
Select All | Selects the entire contents of the current window. |
Command | Description |
Execute | Executes the selected statement in the input pane. If no statement is selected, all statements in the input pane are executed. The statement or statements are executed with SQLExecDirect. Results (if present) are retrieved with SQLFetch and SQLGetData. After a result set is fetched, SQLMoreResults is called to handle any additional result sets. |
Commit | If supported, this command calls SQLEndTran with the SQL_COMMIT option for the current Connection window. |
Rollback | If supported, this command calls SQLEndTran with the SQL_ROLLBACK option for the current Connection window. |
Pipe Menu | For more information, see "Pipes" later in this guide. |
Edit | Creates a new pipe or modifies an existing pipe. |
Do | Runs a pipe against a result set. |
Command | Description |
Manage Data Sources | Calls SQLManageDataSources in the ODBC installer DLL to enable you to add, modify, and delete data sources. |
Data Sources | Calls SQLDataSources to list the data sources on the current system. Although SQLDataSources requires only an environment handle, Admin Demo needs a Connection window to display the results. Therefore, this item is valid only after connecting to a data source. |
Data Types | Calls SQLGetTypeInfo to produce a result set of all data types on the system. |
Functions | Calls SQLGetFunctions to list the functions supported by the current driver. The results are listed in alphabetical order by ISO 92, X/Open, and ODBC conformance. |
ODBC Information | Calls SQLGetInfo to list the values returned for each information type defined in Sql.h and Sqlext.h. (No driver-defined values are retrieved.) |
Lists | These menu items provide a dialog box interface to the ODBC catalog functions. See the ODBC Programmer's Reference for details about each of the following functions:
Tables—Calls SQLTables to produce a result set of tables. Columns—Calls SQLColumns to produce a result set of columns. Statistics—Calls SQLStatistics to produce a result set of index information. Primary Keys—Calls SQLPrimaryKeys to produce a result set of primary key information. Foreign Keys—Calls SQLForeignKeys to produce a result set of foreign key information. Table Privileges—Calls SQLTablePrivileges to produce a result set of table privilege information. Column Privileges—Calls SQLColumnPrivileges to produce a result set of column privilege information. Special Columns—Calls SQLSpecialColumns to produce a result set of column information in a specified table. Procedures—Calls SQLProcedures to produce a result set of procedures. Procedure Columns—Calls SQLProcedureColumns to produce a result set of procedure columns. |
Command | Description |
Font | Selects the default font to use for Results windows. This value is stored in Admndemo.ini for subsequent use. |
Cascade | Cascades all child windows, including Connection and Results windows. |
Tile | Tiles all child windows, including Connection and Results windows. |
Arrange Icons | Arranges all child window icons in the frame window area. |
Close All | Closes all child windows, including Connection and Results windows. |
List Of Open Windows | Lists each child window using the form N:<USER ID>@<DATA SOURCE> for Connection windows and N:<USER ID>@<DATA SOURCE>:<RESULTS> for Results windows, where N is the number in the list, <USER ID> is the user name, <DATA SOURCE> is the data source name, and <RESULTS> is the Results window name. |
Command | Description |
Help | Opens the ODBC Samples help file. |
About | Displays version information for Admin Demo. |