Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Log on Password
Message
De
03/03/2008 21:26:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
03/03/2008 20:21:54
Ed Hizon
Skswood Sdn. Bhd
Kuala Belait, Brunei
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01298310
Message ID:
01298320
Vues:
20
>Dear all,
>
>I was task to make a timewriting program electronically and would like to know if it is possible to get the time of the server computer so that nobody could change the time during input. Please advise also if I could refer to the logon password as the password to verify before they could input their time.
>
>Thanks in advance.
function getservertime()
#define hServerPath  "\\machine\up\there"

lcFile=forcepath(forceext(sys(2015), "tmp"), hServerPath)
h=fcreate(lcFile)
if h>0
   fwrite(h,"...")
   fclose(h)
   ltTime=fdate(lcFile,1)
   erase (lcFile)
else
   ltTime={ :}
endif
return ltTime
Take this as metacode - first, you need to get the server path from somewhere, not hardcode it. Second, you may as well use strtofile() instead, may look cleaner.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform