Database update every 30 minutes

I am working on a C # .Net Windows application with SQL Server 2005. In this project, I am using ADO.Net Data-service to serve a database. I am working in the field of industrial automation, here the data continues to be read for over 8 hours. After reading data from a device based on a trigger, I periodically update the data in the database. eg

  • start reading data at 9.00AM, triggering at 9.50AM. once triggered fire, the last 30 minutes (9.20 AM to 9.50AM) data storage into data base. After the trigger fires, continue reading data from the device and storage to the database.

  • 10.00 AM a trigger that is disabled while storing data in the database must be stopped. Start shooting again at 11.00AM. After a fire is triggered, the last 30 minutes (10.30 am to 11.00 am) are stored in the database. After the trigger fires, continue reading data from the device and storing it in the database.

  • After starting 10.00AM, the trigger does not cause the data to be stored locally.

    Here I do not know, until the trigger fire starts to read data, where and how to temporarily maintain, after triggering, the last 30 minutes of data on how to transfer and store in the database. I do not know how to do that. It would be great if anyone could suggest any idea.

thanks

+2


a source to share


1 answer


If your application is running all the time, you can simply use the standard Windows.Forms.Timer file set with the appropriate timeout. Each timeout event you can start the process of updating your database.



I haven't used ADO.NET much, but I believe you can store data temporarily in your DataSet object (or whatever object locally stores the database view). When you're ready, you can push this data from the object into the database.

0


a source







All Articles