0

I'm making a program for a hotel management where a user input a check-in date and check-out date If the client stays beyond this time, he is charged for another day.

my main problem here is that how can i execute my code that not needed to push a button.

my idea is use a timer and set a time interval every hour so that it checks the database if the system time and check-out time is met. any ideas?

Mharveen Biu
  • 215
  • 1
  • 3
  • 12
  • Maybe this can help: http://stackoverflow.com/questions/3070277/mysql-event-scheduler-on-a-specific-time-everyday – uzr Oct 22 '13 at 07:17
  • any other ideas? im not that familiar with MYSQL even though i'm using SQLServer, still only basic codes for sql i know. i'm more of a vb guy. thanks for the reference – Mharveen Biu Oct 22 '13 at 07:44
  • You could use [Quartz](http://quartznet.sourceforge.net/) – Ric Oct 22 '13 at 07:57
  • Why do you need to change the database data exactly at check-out time? MS SQL server comes with an agent that can run code every day at a given time. You could create a job that runs an update query every day. – Werner Henze Oct 22 '13 at 08:59

0 Answers0