"I" Insert Record
- Command string:
- CMND$ = "I\{FileNo}\{KeyString1}[\{KeyString2}[\{KeyString3}]]"
FileNo | File number |
KeyString# | Key value |
[ ] | optional |
- Purpose:
- Insert a new record.
- Description:
- This command is used to insert the primary keys of a new data record into the index file. After the insert, the record number of the new record is returned in the "RECNO"-variable. You can use this record number to write the data record to the data file. The number of keys included in the command string must equal the number of primary keys you specified in the Create Indexfile (C) command.
The length of the transferred keys may not exceed the maximum key length specified with the Create Indexfile (C) command. Variable length keys will be padded with the Ascii char 0 to the maximum key length. - Parameters returned:
ERRORCODE: | Errorcode or 0 (no error) |
RECNO: | Record number |
FATSKEY: | Undefined |
- Example:
- CMND$ = "I\1\"+KEYSTRING$+"\"+KEYSTRING2$
BASIC Example
Pascal Example
C Example
- See also:
- "1" Insert Single Key; page 4-6
"C" Create Indexfile; page 4-18
© 2008 GCS Software, Udo Gertz