Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The Impossible String !
Message
 
To
19/11/2015 04:04:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01627611
Message ID:
01627636
Views:
50
Thanks! Will do !

>Add a memo field for tracing intermediate results, as setting a breakpoint only happens when the "bad" data is already built or even worse only sometimes with client data in runtime - and clean up your code!
>
>

>SET CENTURY ON
>SET DATE TO YMD
>
>if m.goApp.lTrace
> local lcTrace
> lcTrace = "Enter" + chr(13) + m.lcText
>endif
>
>lcText = m.lcText + "^" + STRTRAN(ALLTRIM(TTOC(rx.filled_date + rx.days_supply)),"/","-") + "^|"
>
>if m.goApp.lTrace
> ** add more INfo / steps to lcTrace Variable as you need before the check at end
> lcTrace = m.lcTrace ;
> + Chr(13) + "date+supply" + TTOC(rx.filled_date + rx.days_supply);
> + Chr(13) + m.lcText
>endif
>
>SET DATE TO AMERICAN
>SET CENTURY OFF
>* Price Override (Not supported) (position 39)
>lcText = m.lcText + "^^|"
>* Diagnoses (Code and Qualifier) (position 40 - 41)
>IF USED("diagnoses") and THIS.m_seek(ALLTRIM(STR(rx.rx_no)) + ALLTRIM(STR(refill_no)),"diagnoses","fullrx",1)
> lcText = m.lcText + "^" + ALLTRIM(diagnoses.diagnosis_code) + "^|";
> + "^" + ALLTRIM(diagnoses.diagnosis_code_qualifier) + "^|"
> if m.goApp.lTrace
> lcTrace = m.lcTrace ;
> + Chr(13) + "Diagnosiscodes open and found" + more info according to your tables;
> + Chr(13) + m.lcText
> endif
>ELSE
> lcText = m.lcText + "^^|" + "^^|"
>ENDIF
>
>* Facts and Comparisions Disease Code (Not supported) (position 42)
>lcText = m.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 = m.lcText + "^" + STRTRAN(ALLTRIM(TTOC(rx.written_date)),"/","-") + "^|"
>
>SET DATE TO AMERICAN
>SET CENTURY OFF
>
>if m.goApp.lTrace and occurs( "^^|", m.lcText)>4
> If (Working on a base table with added Trace Memo Field)
> replace cTraceMemo with m.lcTrace in WorkTable
> else
> = StrTofile(m.lcTrace, "yourlog.txt",.t.)
> endif
> assert .f. "Wrong number of Space-Placeholders!" && or a direct set step on if vfp.startmode or your typical check allows it
> endif
>
Tommy Tillman A+ NetWork+ MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform