Previous Topic Next topic Print topic


Record Menu

The Record menu provides commands for moving among records, updating records, and performing other data entry functions. Most of these commands require that you have the Allow Editing command checked. The Record menu is available only when a Result window is the active window.

Update Explicitly writes the current record's changes to the database. If Autocommit is on, you do not need to click Update; simply moving your cursor to another record or closing the Result window will automatically update the record your cursor was on. The Update command is enabled only if there have been changes to the field(s) of the current record since it was last read from the database. The Allow Editing command must be checked for this command to be enabled.
Delete Deletes the current record from the database. The Allow Editing command must be checked for this command to be enabled.
Undo Removes the changes made to the record that the cursor is on by re-reading the record from the table. The Undo command is available only if you have made changes to the fields of the current record since you last read it, and you have not moved to another record.

If the last undo-able action is a delete, this command changes to Undo Delete, and choosing it will undelete (restore) the deleted record.

Append Duplicate Appends a copy of the selected record to the end of a result table when Allow Editing is enabled. If there is a unique index on any of the fields in the record you are appending, you must change the values in these fields before moving from the appended row.
Data Entry Switches to Data Entry view of the Result window, in which only newly inserted records are displayed. Initially, you see only a blank record into which you enter data for a new record. As you enter the data for each record and move to the next record, the new record is inserted into the database. Enabled only if the Allow Editing command is checked.
Show All Records Switches from Data Entry view (which only shows newly inserted records) to a regular view that shows all records in the result.
Moving and Scrolling Commands When using any of the following moving and scrolling commands, SQLWizard updates the current record before moving the cursor and redisplaying the requested records. The directional arrow buttons on the toolbar perform the same functions as these commands.
  First


*

Moves the cursor to the first record of the entire set of results records.
  Previous Page


*

Moves the cursor and displays the results of the previous page of records. This command is only visible in Result Table view.
  Previous


*

Moves the cursor to the previous record. In Result Table view, SQLWizard scrolls the display if the previous record is not completely visible.
  Next


*

Moves the cursor to the next record. In Result Table view, SQLWizard scrolls the display if the next record is not completely visible.
  Next Page


*

Moves the cursor and changes the results display to the next page of records. Next Page is available only in Result Table view.
  Last


*

Moves the cursor to the last record of the entire set of results records. In Result Table view SQLWizard scrolls the table if the last record is not completely visible.
  New


*

Moves to the end of the result set and displays a blank record where you can enter data. Only available if Allow Editing is checked.
Note:

If your result is very large (has many records), the New command will have a negative performance impact because the system must seek to the end of the result set before the data entry can occur. If you want to insert a record without seeking to the end of the result set, switch to Data Entry mode using the Data Entry command on the Record menu.

Goto Click the Goto command to display the Goto Record dialog box. Type the number of the record to which you want to move and click OK. This is particularly useful for very large tables.

If you enter a record number higher than the highest in the table, the last record in the table is displayed.

Refresh Redisplays the current Results table by re-running your original query. The cursor moves to the first record.

If you have changed any fields of the current record, SQLWizard updates that record before refreshing the display. If you made changes to the table which you have not committed (if running with Autocommit off), SQLWizard prompts you to commit changes before refreshing the table.

Commit Makes all the changes in your current transaction, as well as the current record, permanent, as it saves them to the disk. Commit is not available if you checked Autocommit.
Rollback Rollback is like an Undo. If the Rollback command is active (and the Backward Log is turned on through the Options utility), you can click Rollback to return your data to the condition of the last commit.

Rollback is not available if you checked Autocommit on the Record menu because when Autocommit is on, XDB Server automatically commits each record as you complete it.

See Transaction Processing for more information about the Commit, Rollback, and Autocommit concepts,.

Autocommit When you check Autocommit, changes are saved to each record as soon as you move your cursor to another record. When Autocommit is off, you must explicitly commit changes to the table. You may be able to rollback changes since the last commit; see Rollback command above.

When you click Autocommit on, SQLWizard automatically commits any changes to fields that you have not already committed.

SQLWizard lets you set a default initial setting for Autocommit on the Query Run tab of the Options utility. The status of Autocommit on the Record menu always over-rides the default in the Options utility.

Count

Refreshes the data in the status bar at the bottom of the SQLWizard window, to reflect the current count of records in the result, and the record number where the cursor is currently located.

Sort Displays the Order By dialog box allowing you to sort the records in the result. You can sort the result by one or more columns.

To select a column to sort by, double click its name to move it to the Sorted Columns list. To deselect a column, double click its name to move it to the Unsorted Columns list. You can select one or more columns for your sort.

To indicate if the sort should be ascending or descending for each column, click the Arrow-Toggle button next to each name in the Sorted Columns list.

If sorting by more than one column, you can define your sort priority by re-arranging the items in the Sorted Columns list. To move a column name up or down the list, click to highlight the column name, then click the up or down arrow buttons to the right of the Sorted Columns list to reposition the column name.

Allow Editing If you select Allow Editing, the system attempts to reopen the Result window in Edit mode so that you can update, delete, and insert records. When editing is allowed, SQLWizard displays a check mark next to Allow Editing. You will not be able to check Allow Editing if the query does not support updates, as would be the case if you run a join query.

When you check the Allow Editing command, the following edit commands become available on the Record menu: Update, Delete, Undo, New, Data Entry, Commit, Rollback, and Autocommit. Other requirements may restrict the availability of these features.

If you uncheck Allow Editing, you cannot make changes to the records. SQLWizard disables editing commands on the Record menu.

Note:

When running against a non-XDB Server data source such as mainframe DB2, you will not be able to edit a result table unless the result includes a unique index (or primary key), or unless the Check Unique Key option is disabled.

Previous Topic Next topic Print topic