Naturally, it may be necessary to load indexes from disk. This needs a medium-file-name and a device.
The file which is loaded needs the _ddi extension. This doesn't have to be specified.
The newly created index will become the default one.
Sbasic indexLOAD #bufferid, filename, device filename : string device : [string] Assembler ILOA bufferid string filename optional string device return indexid C long DDindexload(long bufferid, char *filename, char *device); errors, code, meaning itnf -7 invalid bufferid imem -3 insufficient memory fdnf -7 file or device not found isyn -21 this is not a DATAdesign index file ... any other file i/o error
This command makes sure that there is an up to date version of your index on disk. If no device is passed, and saving to just the medium-file-name doesn't work, then the file is saved to the data_use device.
You can also state the overwrite status (over). If this is zero and the medium-file already exists, an error will be reported. If over is set, then the medium-file will be overwritten.
The medium-file will get the _ddi extension. This extension never has to be specified.
Sbasic indexSAVE #bufferid, filename, device, over filename : [string] device : [string] over : short[0] Assembler ISAV bufferid string filename optional string device short overwrite status C long DDindexsave(long bufferid, char *filename, char *device, short over); errors, code, meaning itnf -7 invalid bufferid drfl -11 drive full fex -8 file already exists ... any other file i/o error