My monitoring system is using a device/hardware which data is sent through the use of serial port, and I just found out that receiving data is done through another thread, the DataReceived event, and I am planning to save those data on a database plus displaying the data through charts. I used the invoke/delegate functions to throw the received data to the main thread. My question is on how do I insert those data on my database?
I currently have two plans:
1. On the DataReceived event, I will immediately save it on my database.
2. I will store those data on a list, then after receiving, after monitoring, I'll save the data on the list to the database.
Do you have any better/efficient way?
Thanks
I currently have two plans:
1. On the DataReceived event, I will immediately save it on my database.
2. I will store those data on a list, then after receiving, after monitoring, I'll save the data on the list to the database.
Do you have any better/efficient way?
Thanks