C# - Winforms - SQL Server
i am building an application which displays some data on the screen of the current day which it gets from the database... the application is like a desktop widget so the data is always visible on the desktop
the scheme i implemented is
when user commits some change to the data, after the update query i call the "update display" function... and the new data is retrieved...
by doing so i don't have too check constantly/periodically for changes in the database and data on the display is always current.. this sort of becomes PUSH technology
now it keeps track of the data in the database for every day but only today's data is displayed... and when the program starts (manually\system start-up), it checks the date and
- if the record of the current day doesn't exist, it creates it and start display which can be later modified
- if the record exists then it just simply start display and there are interfaces available for modifying data
now the problem is
If the PC is running & Application is running at 12:00 pm and the date changes... There is no technique to check that :
- the day has changed and new record has to be created in database and the display needs to be refreshed
now i can continuously check via loop for the date change and solve my problem but i would love if there is a better option...