Don't use Sleep
If you use Sleep( ms ) to do your timing, you are going to be unhappy. The whole time your program is sleeping, it isn't responding to windows messages. I wrote a program that downloads a file at 6:30 or so every morning. I couldn't get it to respond (showed up as not responding in task manager) while I was using System.Threading.Thread.Sleep(). So, I looked around on MSDN, and found system timers. The idea is, you create a timer of a specific duration. Once your program starts, you initialize the timer. Then, every <time interval> later, you receive a WM_TIMER message. Then you can use that message to call your database connection. This way, your program still responds to other messages while waiting for the correct time.
BTW, in my application, every time I got a WM_TIMER message, I checked to see if the time was within my startup window, and then processed. If not, I just wait for the next WM_TIMER message, and check again.
To add the timer to your code, go to design view, and click on the system tab on the left. Drag the timer icon to your program, then you can set its properties. Then just handle timer1.elapsed() events.