Use to read a record that you do not intend to modify.
ReadO variable From [table_var | Cursor cursorvar], key Then | Else statements
The ReadO statement has the following parameters.
|variable||Assigned the value of the data from the specified column of the row specified by key.|
|Table_var||A table variable that has been previously specified in an Open statement.|
|cursorvar||If accessing a cursor, cursorvar contains a cursor variable. Cursor variables are initialized with a Select...By statement and must be preceded with the word Cursor.|
|If the table being accessed has had control features added, cursor access will automatically invoke domain conversion during a ReadO.|
|Key||The row referenced by key will be read from the table identified by table_var or the table accessed using the cursor in cursorvar.|
|Then||The statements in the Then clause will be executed if a row is read successfully.|
|Else||The statement(s) following Else are executed if the row in variable cannot be read. The Status() function indicates the severity of the error, and the system variable @FILE_ERROR contains details about the nature of the error.|
ReadO is used to read a row that will not be updated. As a consequence, the read request may be fulfilled from any cache or buffers being maintained by the filing system. ReadO, therefore, can be a faster method of accessing data than by using the Read statement. In a multi-user environment, ReadO does not necessarily read the most current version of a row.
Note: The definition of ReadO (and the use of caches or buffers) is specific to the filing system being used. Many filing systems do not cache data and therefore implement Read and ReadO identically.