Description
Reads a specific column into a BASIC+ variable.
Syntax
ReadV variable From table_var, key, column Then | Else statements
Parameters
The ReadV statement has the following parameters.
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. |
Key | Contains the key to the column that is to be read. |
column | The index number of the column that is to be read. The value of column must be greater than zero. |
Then | The statements in the Then clause will be executed after a successful ReadV operation. |
Else | The statement(s) following Else are executed if the column cannot be read. The Status() function indicates the severity of the error, and the system variable @FILE_ERROR contains detail about the nature of the error. |
See also
MatRead, Open, Read, Write, Xlate()
Example
/* Column 2 of rows 100 through 106 is read into cname, and returned to the caller. */ Open "CUSTOMERS" To CUSTOMER_TABLE Else status = Set_FSError() Return End For I = 100 To 106 ReadV cname From CUSTOMER_TABLE, I, 2 Then /* process cname */ End Next I End