Page History
...
Parameter | Description |
---|---|
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. |
...
See also
MatRead, Open, Read, Write, Xlate()
Example
Code Block |
---|
/* This code fragment counts the number of bytes in the CUSTOMERS table. The result is stored in data_bytes at the end of the loop. ReadO is used because record locking is unnecessary, since the only purpose of reading each row is to determine its length. */ Open "CUSTOMERS" To customers_file Then data_bytes = 0 Select customers_file Done = 0 Loop ReadNext @id Else Done = 1 Until Done do ReadO @record From customers_file, @id Then data_bytes += len(@record) + len(@id) End Repeat /* data_bytes contains the number of data bytes in the table. */ End |