Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Runtime STRTOFILE replace for DEBUGOUT
Message
 
 
To
21/01/2009 11:13:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01375897
Message ID:
01375925
Views:
12
>Wow, you're fast and yes, it was your routine (and it was the tlNotime param I wanted to remember)
>
>
>
>*-- Writes to logfile
>	PROCEDURE WriteToLogfile
>	LPARAMETERS tcString, tlNoTime
>	=STRTOFILE(IIF(m.tlNoTime, "", TTOC(DATETIME()) + " ") + ;
>		M.tcString + CRLF, THIS.cLogFileDir + THIS.cLogFile, 1)
>	ENDPROC
>
>
>
>Thanks again

You're welcome, this one is part of the business class.

I have one more little program that I have found helpful writting SQL statements.
********************************************************************
*  Description.......: FieldsToString - creates a string with fields in a table
*  Calling Samples...:
*  Parameter List....: tlAddTypes, tlAddAlias
*  Created by........: Nadya Nosonovsky 04/21/2005
*  Modified by.......: *-- CHANGE - NN - August 10, 2005 - 15:10:45
********************************************************************
FUNCTION FieldsToString
LPARAMETERS tlAddTypes, tlAddAlias

LOCAL lcStr, lnI, lnFields, laFields[1], lcType
lnFields = AFIELDS(laFields)
lcStr = ""

FOR lnI = 1 TO m.lnFields
	lcType = laFields[m.lnI,2]
	lcStr = m.lcStr + ", ;" + CHR(13) + CHR(10) + ;
		IIF(m.tlAddAlias,ALIAS() + ".", "") + ;
		LOWER(LEFT(laFields[m.lnI, 1],1)) + ;
		PROPER(SUBSTR(laFields[m.lnI, 1],2)) + ;
		IIF(m.tlAddTypes, " " + m.lcType + ;
		IIF(NOT INLIST(m.lcType, "D","T","I","G","M","Y"), "(" + TRANSFORM(laFields[m.lnI,3]) + ;
		IIF(laFields[m.lnI,4] > 0, ", " + TRANSFORM(laFields[m.lnI,4]),"") + ")",""),"")
NEXT
_CLIPTEXT = m.lcStr
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform