Timer or Thread?

Posted by Pradeep Singh on Stack Overflow See other posts from Stack Overflow or by Pradeep Singh
Published on 2012-07-06T04:30:16Z Indexed on 2012/09/14 15:38 UTC
Read the original article Hit count: 530

Filed under:
|
|

I have a method(say method1) that writes to database(sqlserver)and another method(say method2) that tries to access the same database after some time and updates the data row that was created by method1.

The problem arises when method1 fails to access db due to the LAN being disconnected (this is not an exception this is a scenario that will definitely arise in my software, getting into details will make the question too complex) if method1 fails to access db method2 cannot work.

What I want to do is to make method1 store values to local db instead of server if the LAN is disconnected and as soon as it enters value in local db the application should start trying to access the server after ever 10-15 seconds.

What should I use timer or create a new thread?

© Stack Overflow or respective owner

Related posts about c#

Related posts about multithreading