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.

ParameterDescription
variableAssigned the value of the data from the specified column of the row specified by key.
Table_varA table variable that has been previously specified in an Open statement.
KeyContains the key to the column that is to be read.
columnThe index number of the column that is to be read. The value of column must be greater than zero.
ThenThe statements in the Then clause will be executed after a successful ReadV operation.
ElseThe 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

MatReadOpenReadWriteXlate()

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
  • No labels