WRITE
|
Syntax: |
WRITE <Name of Index File> ON ERROR ...
END <Name of Index File> = <INDEX
FILE> |
||
|
Meaning: |
Writes a record into the Index File. The record of the Index File specified by the
current primary key is written. In the case of an error the block ON ERROR
... END is executed. The variables OK and OK2 then contain the error number
and ERRORTEXT$ contains the error text. Note: If the data record already exists, the data record must have been
read before by a READ instruction (READ, READS, START, STARTS, READ-PREVIOUS, READ-NEXT, READS-PREVIOUS, READS-NEXT) in the openmode so that the current record is locked. With the
attempt to write a locked data record the error 1062 is reported. |
||
|
Parameter: |
|
||
|
Sample: |
CUSTOMER.NUMBER = 300 CUSTOMER.NAME$ = "Smith" CUSTOMER.NAME2$ = "John" CUSTOMER.ZIP = 80333 CUSTOMER.CITY$ = "Munich" CUSTOMER.STREET$ = "Sonnenstr. 24" WRITE CUSTOMER ON ERROR
ERRORMES = "Error writing
CUSTOMER:" +
STR$(OK)
+ STR$(OK2)+
" " + ERRORTEXT$
END |
||
|
See also: |
|