<<

Contents

Search

>>

 

READ

 

 

Instruction

 

 

Syntax:

READ <Name of Index File> ON ERROR … END

 

<Name of Index File> = <INDEX FILE>

 

Meaning:

Reads a record from an Index File by the primary key.

 

The data record which is clearly specified by the current values of the file fields of the primary key is read from the Index File. In the case of an error the block ON ERROR ... END is executed.

 

Parameter:

Name of Index File

Name of Index File

 

Sample:

CUSTOMER.NUMBER = 4711

READ CUSTOMER ON ERROR ERRORMES = "Customer No." + STR$(CUSTOMER.NUMBER) +

                                  " not found. Error " +

                                  STR$(OK) + STR$(OK2) + " " +

                                  ERRORTEXT$

              END

 

See also:

Index File error numbers

READS

READ-NEXT

READS-NEXT

READ-PREVIOUS

READS-PREVIOUS

START

STARTS

READ_NEXT_MULTI

READ_PREVIOUS_MULTI

GET_FIRST_RECORD

GET_NEXT_RECORD

SEARCH

WRITE

DELETE

OK

OK2

ERRORTEXT$

EBUS_INDEXKEY$