Board index » delphi » Resetting a parodox field's value to 0 at start of new day

Resetting a parodox field's value to 0 at start of new day

Hi

I have an one field paradox table which I use as a counter for new queries.
I want to reset the value to 0 at the beginning of everyday (
automatically).  How can I do this?

Thank you

 

Re:Resetting a parodox field's value to 0 at start of new day


How accurate do you have to be? If usere are on the systems at
midnite, is there a problem in not resetting at exactly the right
moment. Is this a networked app? If so, there probably will be
variations in clock settings.

This might do what you want:
1  add a date field to the table
2  when incrementing the number value, test to see if the date is
still TODAY.
3  if it is, increment the number
4  if it is not, set the number to 1 and set the date to TODAY

hth,
Dan

On Fri, 10 May 2002 14:52:13 +0200, "Winston Tuck" <wt...@yebo.co.za>
wrote:

Quote
>Hi

>I have an one field paradox table which I use as a counter for new queries.
>I want to reset the value to 0 at the beginning of everyday (
>automatically).  How can I do this?

>Thank you

--
Dan Brennand
CMDC systems, inc.
Configuration Management and Document Control:
visit us at www.cmdcsystems.com
[SPAM block: my e-mail address is DanB at CMDCsystems.com]

Re:Resetting a parodox field's value to 0 at start of new day


Thanx

I also thought of this last night and I think it will work.  Thank you

Quote
"Dan Brennand" <D...@nowhere.com> wrote in message

news:3cdbe87c.159570658@news.dimensional.com...
Quote
> How accurate do you have to be? If usere are on the systems at
> midnite, is there a problem in not resetting at exactly the right
> moment. Is this a networked app? If so, there probably will be
> variations in clock settings.

> This might do what you want:
> 1  add a date field to the table
> 2  when incrementing the number value, test to see if the date is
> still TODAY.
> 3  if it is, increment the number
> 4  if it is not, set the number to 1 and set the date to TODAY

> hth,
> Dan

> On Fri, 10 May 2002 14:52:13 +0200, "Winston Tuck" <wt...@yebo.co.za>
> wrote:

> >Hi

> >I have an one field paradox table which I use as a counter for new
queries.
> >I want to reset the value to 0 at the beginning of everyday (
> >automatically).  How can I do this?

> >Thank you

> --
> Dan Brennand
> CMDC systems, inc.
> Configuration Management and Document Control:
> visit us at www.cmdcsystems.com
> [SPAM block: my e-mail address is DanB at CMDCsystems.com]

Other Threads