PDA

View Full Version : How to Insert Record when time hits 00:00:01 Hrs


bullsb
04-14-2009, 06:05 PM
Hi All,

Need your help.

In the project Im developing. I need to enter yesterdays closing balance as todays opening balance automatically when the time hits 00:00:01 Hrs.

Let me put you in this way...

1. I have a opening balance on 01/04/2009 as $0.00 (First time entring in databse)

2. Received a cheque on 01/04/2009 for $100.00 & my closing balance on 01/04/2009 is $100.00

3. There are no transactions on 02/04/2009 (However, I need to show the opening & closing balance as $100.00 since there is no transaction on 02/04/2008) - this to be entered when the time hits 00:00:01 on 02/04/2008 and both opening & closing balance to be shown as $100.00 and if suppose I make some transction on 02/04/2009 I will use the UPDATE statement.

4. When I chk my record on 03/04/2009 I need to show the opening Balance i.e. whatever the closing balance on 02/04/2009

I am stuck to proceed further.

Old Pedant
04-14-2009, 09:54 PM
First of all, it's not really polite to cross post:
http://www.aspmessageboard.com/showthread.php?t=231403

Secondly, why do you think you need to do any insert just to get a balance?

Thirdly, you can't in general force something to happen at a given time with ASP code. You would need to use a task scheduler to either hit the page from the same or another machine or to maybe invoke a WSH page to do the equivalent.

bullsb
04-15-2009, 12:53 PM
Thanks Bro. Will not post into multiple forums.