Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checksum works different in Runtime
Message
De
30/06/2003 15:11:13
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00805157
Message ID:
00805432
Vues:
26
>Can you post code for Checksum function?
>
>>When I run Checksum(myDateTime) in developement I get a different value than during runtime.
>>I have set seconds, set hours, set date and set century set the same in Runtime and Developement.
>>What else am I missing?
>>
>>TIA

Hi Sergey,
Here's the method() I use to calculate checksum
method myCheckSum()
  LPARAMETERS tt

  IF VARTYPE(tt) # 'T'
    tt = {}
  ENDIF

  LOCAL lc
  lc = SYS(2007,TRANSFORM(tt-60))
  RETURN lc

method mySetTime()
  lt = datetime()
  lc = this.myCheckSum(lt)
  replace myDateTime with lt, dt_check with lc

method myValidate_Time()
  return this.myCheckSum(myDateTime) # dt_check
for ctot("06/29/2003 11:01:39 PM")
Runtime version returns 46007
Development version returns 37964

If I run myValidate_Time() from the same version (Runtime or Development) that mySetTime() was run it returns .t., but if I run them from different versions it returns .f.
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform