SA_IsiRead


 

SA_IsiRead reads in the first encountered record that meets the key specification.

int SA_IsiRead ( SA_FH IsiFH, u8 *Buffer, u32 BufLen, u8 *Key, u16 KeyLen );

Parameters:
IsiFH
The handle of the previously opened or prepared ISAM file.
Buffer
The buffer filled by the operation.
BufLen
The length of the {Buffer}.
Key
A null terminated string that specifies the text that must match to qualify the record.
KeyLen
The length of the {Key}.

Note the following:

  1. {buffer} size must be equal to or larger than the {reclen} parameter specified in SA_IsiPrep plus one (1) for null termination.

  2. A null buffer pointer will allow positioning to the indicated record without actually reading it.

  3. Function return codes are as follows:

  4.  

    Value

    Meaning

    nn

    Number of bytes read + 1.

    0

    No record meet this key specification.

    -nn

    Error as described in Sunaccess Errors

Example:

 

long fh;

char buffer[2048];

char key[] = {"018634"};

 

SA_IsiRead(fh, buffer, sizeof(buffer), key, sizeof(key));

 

 



Sunaccess Reference SA_IsiClose SA_IsiReadKS