This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Update record

Hi There,

Can I update the record only by adding content based on the former record?

Best,

Gaosheng

Parents Reply
  • Hi,

    In order to use fds_record_update(), you need a record descriptor to tell FDS which record you want to update. This means you do need to search for the existing record, for instance through use of fds_record_find(). If you do not find an existing record, you should use fds_record_write() instead.

    See for instance how this is done for the Flash Data Storage Example. There you will find relevant code in the function record_update() in the file cli.c. There is also use of fds_record_find() in the main() funciton of main.c, where the record is read, modified and updated (if it exists) or written (if it does not exist, in the else branch.)

    Regards,
    Terje

Children
No Data
Related