title: Termination of a .net program
body: <p>I have an application which I wrote in vb.net. When the application starts it connects to mysql database online to get some data and once done it proceeds.</p>
  
  <p>The problem is that at times it gets stuck in the mysql thing, I mean after requesting nothing happens and this causes my program to lock up. This can be because of internet problem or server.</p>
  
  <p>Is there a way the program can determine that x seconds has elapsed and it has not got any data, so self terminate it. I tried using timer to perform this action but as the program requests for data, it gets stuck, I mean it locks up and thus timer also locks up and only after task is done everything resumes. </p>
  
  <p>I wanted that when the program is about to start request, I can start a timer and determine that x seconds has elapsed, so now terminate the application.</p>
  
  <p>Please let me know how can I do this ?</p>
  
  <p>Thanks,</p>
  
  <p>Cheers,
  Greatchap</p>