
IDXNum% = VAL(MID$(Cmd$, 3, 1))
CardID$ = RIGHT$(Cmd$, LEN(Cmd$)-3)
IF CmdIdentifier$ = "?" THEN
IF FIND_RECORD(DBFNum%, IDXNum%, CardID$) = 1 THEN
PRINT "Data is found in DBF.", DBFNum%
ELSE
PRINT "Data is not found in DBF.", DBFNum%
END IF
ELSE
...
GET_RECORD$
Purpose
To get a record in a specified DBF file, which the file pointer of a specified IDX file
is pointing to.
Syntax
A$ = GET_RECORD(file% [,index%])
Remarks
"A$" is a string variable to be assigned to the result.
"file%" is an integer variable in the range of 1 to 5, indicating which DBF file to be
accessed.
"index%" is an integer variable in the range of 1 to 3, indicating which IDX file to
be accessed. If it is not specified, the default IDX file which keeps the original data
sequence will be used.
Example
ON COM(1) GOSUB BcrData_1
...
BcrData_1:
BEEP(2000,5)
ID$ = GET_READER_DATA$(1)
IF FIND_RECORD(DBFNum%, IDXNum%, ID$) = 1 THEN
Data$ = GET_RECORD$(DBFNum%, IDXNum%)
Item$ = MID$(Data$, LEN(Data$)-IDLeng%-ItemLeng%)
Note$ = RIGHT$(Data$, LEN(Data$)-IDLeng%-ItemLeng%)
LOCATE 1,1
PRINT "ID :", Data$
LOCATE 2,1
PRINT "Item :", Item$
LOCATE 3,1
PRINT "Note :", Note$
Comentários a estes Manuais