title: Polling database to print out files
body: <p>I need a program that sends any files in my database (MSSQL) to my printer. I thought of using something like this:</p>
  
  <pre><code>Thread.Sleep(20000);
  </code></pre>
  
  <p>So every 20 seconds I check my database if there are any changes and if so, print the files. But I was wondering if there is a better way? 
  Something to send interrupts to my program when the database changed?</p>