This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Start using fds, what is the difference between fds_record_write and fds_record_update?

With the same file id and record id, do these two functions do the same thing?

Thanks

Paul

  • Hi,

    No, as described in the FDS Library documentation, it is possible to have multiple records with the same FILE_ID and RECORD_ID. If you call fds_record_write(), it will only create a new record, meaning you will have two record with the same RECORD_ID. fds_record_update() on the other hand, will create a new record and then invalidate the old record, leaving you with only one record.

    When calling fds_record_update(), the parameter p_desc must point to the old record to be invalidated. On return, p_desc will point to the new record, similar to the return of fds_record_write().

    Best regards,

    Jørgen