Board index » delphi » Never underestimate the Power of the User!!

Never underestimate the Power of the User!!

Hi There:

Man, aren't the users something?  You all remember that application that I
wrote that gave me so much trouble on the update/refresh of the grid.  Well,
I move it to MS SQL and works like a charm.  But..., I underestimate the
users.

See, the story behind this little app, was that the HR department will track
where the employees were.  Usually at what time they came thru the door and
at what time they left.  At the beginning, the app was letting the user set
the exact time.  HR said NO NO.  So I changed the app not to let them.  But
now, some smart guys, are back-timing their computer clocks or advancing it
in order to time-stamp their record accordingly.

The question is,  Is there a function that I could call that will get either
the Time on the server in which the table is? or Some kind of Atomic Clock
calcultation?

I may be going a little outside of the context.  Have anybody come across
something like this?

As usual, any advice will be highly appreciated.

Thanks

 

Re:Never underestimate the Power of the User!!


Quote
Juan Rosique wrote in message <39592cbf@dnews>...

>See, the story behind this little app, was that the HR department
will track
>where the employees were.  Usually at what time they came thru the
door and
>at what time they left.  At the beginning, the app was letting the
user set
>the exact time.  HR said NO NO.  So I changed the app not to let
them.  But
>now, some smart guys, are back-timing their computer clocks or
advancing it
>in order to time-stamp their record accordingly.

>The question is,  Is there a function that I could call that will get
either
>the Time on the server in which the table is? or Some kind of Atomic
Clock
>calcultation?

Completely ignore the current time on the user's machine. Write the
Update SQL statement using whatever keyword (@TIMESTAMP?) MSSQL
provides that can be used as a field value.  This will stamp the
user's record with the *server's* date and time.

--
Wayne Niddery - WinWright Consulting
RADBooks - http://members.home.net/wniddery/
You have a Right to Free Speech, but not the right to make me listen,
nor to use my property as a soapbox.

Re:Never underestimate the Power of the User!!


Hi Juan,

In applications we write, dates are very important so it is imperative that
the clock is not backdated.  As far as dates go, I store when the user last
accessed the PC and if the new date was less than the stored date I throw an
exception to this.  Maybe you could use the same sort of approach with
times.  If the PCsare connected to a network you may want to make the app
take the server date rather than the local PC date (how to do this I am
unsure..I'm sure others may know).

Finally I do find it amazing that this company is tracking in this way.
Surely if they want to track employee entry and exit times they would use
what everyone else uses, a clocking system.

You are right, never underestimate the user! :)

Alex

Quote
"Juan Rosique" <j...@spiinc.com> wrote in message news:39592cbf@dnews...
> Hi There:

> Man, aren't the users something?  You all remember that application that I
> wrote that gave me so much trouble on the update/refresh of the grid.
Well,
> I move it to MS SQL and works like a charm.  But..., I underestimate the
> users.

> See, the story behind this little app, was that the HR department will
track
> where the employees were.  Usually at what time they came thru the door
and
> at what time they left.  At the beginning, the app was letting the user
set
> the exact time.  HR said NO NO.  So I changed the app not to let them.
But
> now, some smart guys, are back-timing their computer clocks or advancing
it
> in order to time-stamp their record accordingly.

> The question is,  Is there a function that I could call that will get
either
> the Time on the server in which the table is? or Some kind of Atomic Clock
> calcultation?

> I may be going a little outside of the context.  Have anybody come across
> something like this?

> As usual, any advice will be highly appreciated.

> Thanks

Re:Never underestimate the Power of the User!!


Ok I tried that, maybe I'm doing something wrong.  Because I'm still getting
the client PC time instead of the server's.  Would you please be so kind to
indicate to me (ina sinlge line of code) how do I do this?

Thanks Wayne

"Wayne Niddery (TeamB)" <winwri...@chaffhome.com> wrote in message
news:39593c6c@dnews...

Quote
> Juan Rosique wrote in message <39592cbf@dnews>...

> >See, the story behind this little app, was that the HR department
> will track
> >where the employees were.  Usually at what time they came thru the
> door and
> >at what time they left.  At the beginning, the app was letting the
> user set
> >the exact time.  HR said NO NO.  So I changed the app not to let
> them.  But
> >now, some smart guys, are back-timing their computer clocks or
> advancing it
> >in order to time-stamp their record accordingly.

> >The question is,  Is there a function that I could call that will get
> either
> >the Time on the server in which the table is? or Some kind of Atomic
> Clock
> >calcultation?

> Completely ignore the current time on the user's machine. Write the
> Update SQL statement using whatever keyword (@TIMESTAMP?) MSSQL
> provides that can be used as a field value.  This will stamp the
> user's record with the *server's* date and time.

> --
> Wayne Niddery - WinWright Consulting
> RADBooks - http://members.home.net/wniddery/
> You have a Right to Free Speech, but not the right to make me listen,
> nor to use my property as a soapbox.

Re:Never underestimate the Power of the User!!


Quote
Juan Rosique wrote in message <8jclta$e...@bornews.borland.com>...
>Ok I tried that, maybe I'm doing something wrong.  Because I'm still
getting
>the client PC time instead of the server's.  Would you please be so
kind to
>indicate to me (ina sinlge line of code) how do I do this?

I'm not an MSSQL expert, and I don't know your table or field names,
but it should simply be an SQL statement like:

update some_table set
  the_date_field = @TIMESTAMP
where some_field = some_value

Change the table and field names to the correct values for your
database, put this into a TQuery component's SQL property and call the
query's EXECSQL method.

--
Wayne Niddery - WinWright Consulting
RADBooks - http://members.home.net/wniddery/
You have a Right to Free Speech, but not the right to make me listen,
nor to use my property as a soapbox.

Other Threads