EDIT (Short Name: EDI)
Top  Previous  Next

Use the EDIT command to change data.

edit

Options

DISTINCT

Suppresses the display of duplicate rows. If you specify DISTINCT, you cannot change the data that is displayed.

*

Specifies all columns.

,

Indicates that this part of the command is repeatable.

colname

Specifies a 1 to 18 character column name.

<expression>
Determines a value using a text or arithmetic formula. The expression can include other columns from the table, constant values, functions, or system variables such as #date, #time, and #pi.

=READ

Specifies that the column is read-only, preventing changes to data.

FROM tbleview

Specifies the table.

WHERE clause
Limits rows of data. For more information, see the "WHERE" entry.

ORDER BY clause
Sorts rows of data. For more information, see the "ORDER BY" entry.

MDI

Specifies a modeless edit window-a modeless edit window allows you to access other windows without closing the edit window first.

About the EDIT Command

The EDIT command starts the Data Editor and displays the data you specify. In a multi-user environment, R:BASE checks whether the row of data you are editing has been changed by another user and notifies you if it has - this is called concurrency control.

You can use the EDIT command to modify data when the following conditions are met:

·You have not used the DISTINCT option in the command.  
·You have rights to change the data in the specified table. Access rights are assigned with the GRANT command.  

Notes:

·The EDIT command will display the data within a multi-table View (a View based on multiple tables), but the data will not be editable.  
·A View with a GROUP BY parameter is also not editable.  


Examples

Example 01:

The following command displays all columns in the transmastertable and orders the rows by the customer identification numbers contained in the custid column.  
 
EDIT * FROM transmaster ORDER BY custid  

Example 02:

The command below displays the following columns from the customertable: custid, company, custaddress, custcity, custstate, and custzip. The only rows that are displayed are rows that have 100 for a customer identification. The custid and companycolumns are specified to be read-only and cannot be edited. The command specifies that the display of the company column is to be ten characters wide.  
 
EDIT custid=READ, company=10=READ, custaddress, custcity, +  
custstate, custzip FROM customer WHERE custid = 100  

Example 03:

The following command open all records for the Customer table with a maximized Data Editor window and "Customer Data" as the caption.  
 
EDIT ALL FROM customer OPTION WINDOW_STATE MAXIMIZED|CAPTION Customer Data  
 
Example 04:

The following will start the Data Editor for custid 125, displaying the data as a single row in read only mode.  

EDIT ALL FROM customer WHERE custid = 125 OPTION WINDOW_STATE NORMAL|ROWVIEW|READONLY ON