<<

Contents

Search

>>

 

READ_NEXT_MULTI

 

 

Function

 

 

Syntax:

READ_NEXT_MULTI(<Name of Index File>, <Key Number>, <Array>, <Count>)

 

<Name of Index File>

= <INDEX FILE>

<Key Number>

= <NUM-EXPRESSION>

<Array>

= <STRING-VARIABLE>

<Count>

= <NUM-AUSDRUCK>

 

Meaning:

READ_NEXT_MULTI reads several data records from an Ebus Index File and stores the data records in the <Array>. The number of data records to read is specified by <Count>.

 

<Key Number> specifies the key by which the data records are read. 0 specifies the primary key, 1,..,n specify a secondary key.

 

<Array> must be the name of an one-dimensional String Array which contains at least <Count> elements.

 

<Name of Index File> must be an Ebus Index File.

 

READ_NEXT_MULTI executes several instructions READ-NEXT or READS-NEXT. The <Array> is filled with RECORD$(<Name of Index File>) starting with element No. 1. If less than <Count> data records are found only the found data records are stored in <Array>. READ_NEXT_MULTI returns the number of read data records.

 

READ_NEXT_MULTI is only successful if the file pointer is set properly by a valid START, READ, READ-NEXT oder READ-PREVIOUS instruction with the same key.

 

READ_NEXT_MULTI returns the following results:

 

Result

Meaning

>= 0

Number of data records which had been read.

-1

Index File is not open or is not an Ebus Index File.

-2

<Count> is < 1.

 

Parameter:

Name of Index File

Name of Index File

Key Number

0 = primary key

> 0 = secondary key

Array

Name of the variable of an one-dimensional String Array.

Count

Number of data records to read.

 

 

Sample:

DIM T$(10)

 

INITIALIZE CUSTOMER

START CUSTOMER ON ERROR END

NUMBER% = READ_NEXT_MULTI(CUSTOMER,0,T$,10)

IF NUMBER% < 1
THEN ... Error ..
ELSE FOR I% = 1 TO NUMBER%

         RECORD(CUSTOMER) = T$(I%)
         ...
     ENDLOOP
ENDIF

 

See also:

READ_PREVIOUS_MULTI

READ-NEXT