Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Impossible String !
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01627611
Message ID:
01627612
Vues:
88
>Hey gang!
>
>Weird problem here.
>
>We have some code (show below) that just a few times, out of thousands of time run, sends over this string
>
>^2015-10-14 12:00:00 AM^|^^|^^|^^|^^|^^|^^|^2015-08-10 12:00:00 AM
>
>instead of this....
>
>^2015-10-14 12:00:00 AM^|^^|^^|^^|^^|^2015-08-10 12:00:00 AM
>
>4 "spaces" ( the ^^| segments) should be sent if no data is in the diagnoses table.... but we are sometimes getting 6 !!!
>
>
>
>SET CENTURY ON
>SET DATE TO YMD
>lcText = lcText + "^" + STRTRAN(ALLTRIM(TTOC(rx.filled_date + rx.days_supply)),"/","-") + "^|"
>SET DATE TO AMERICAN
>SET CENTURY OFF
>* Price Override (Not supported) (position 39)
>lcText = lcText + "^^|"
>* Diagnoses (Code and Qualifier) (position 40 - 41)
>IF USED("diagnoses")
>	IF THIS.m_seek(ALLTRIM(STR(rx.rx_no)) + ALLTRIM(STR(refill_no)),"diagnoses","fullrx",1)
>		lcText = lcText + "^" + ALLTRIM(diagnoses.diagnosis_code) + "^|"
>		lcText = lcText + "^" + ALLTRIM(diagnoses.diagnosis_code_qualifier) + "^|"
>	ELSE
>		lcText = lcText + "^^|"
>		lcText = lcText + "^^|"
>	ENDIF
>ELSE
>	lcText = lcText + "^^|"
>	lcText = lcText + "^^|"
>ENDIF
>* Facts and Comparisions Disease Code (Not supported) (position 42)
>lcText = lcText + "^^|"
>* Date Written (position 43)
>* 04/06/07 STB per Matt Bergmann - Changed format to include dashes and time
>SET CENTURY ON
>SET DATE TO YMD
>lcText = lcText + "^" + STRTRAN(ALLTRIM(TTOC(rx.written_date)),"/","-") + "^|"
>SET DATE TO AMERICAN
>SET CENTURY OFF
>
>
>
>any ideas ???
>
>Thanks!
>Tommy

Where do you create the lcText variable (it should be local). Also, you may want to use m.lcText just to make sure it's a variable. Also, could it be that some other code is executed instead?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform