Changing only one Column and Row in a Database

Changing only one Column and Row in a Database

  

Hi,

I am using a REST API in order to update data, however I have to ensure that I have data for every single column otherwise, I will erase existing data. Is there a way to update only one column or do I have to update every single column at once?

I am contemplating using the Advanced SQL queries, but I am confused with how it works at the moment as it seems to be only able to populate lists and not update my Entity.

Thank you.

Regards,
Jerome Lieow

Solution

Hi Jerome, the simplest way to accomplish this is by using the GetTableXForUpdate, update the field you need to update with an assign and the use the UpdateTableX to add this to the DB. 

When you want to do this in an external DB via a REST API, you need to build logic on that side to know which fields are being updated, for instance a structure with all the table fields and Boolean fields per field to tell the other side if this fields need to be updated. On the external side, build logic to only update the fields that need to be updated. 


Kind regards, Remco Dekkinga

Solution

Hi Remco,

Thank you.

Regards,

Jerome Lieow