Is there a way to only load the new or updated (edited) records in a table using Sql in C#?
Suppose i have a table which consists of 1000 student records.I want to show this information in a gridview ( this is just an example ) and upon adding or editing new entries,I want the gridview to get updated and show the latest changes to the table.If i go and have a
select *
statement ,This will definitely kill the application performance,So i thought its a good idea to try to add only those new records to the previously loaded records to the gridview.
But I’m clueless on the How to do such a task.
There is no other solution then simply architect you database.
Just one of many possible solutions: for every inserted or updated record in database you can have a
timestamp. Having that information in database you can:a) get the latest, from
timestamppoint of view, record in yourDataGridb) get from darabase all reoirds that have
timestampbigger then it.I repeat, this us just one of many possible solutions. What fits your requirements has to be decided by yourself.