Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Side by side comparison (strings & local data)
Message
From
24/12/2003 09:29:24
Walter Meester
HoogkarspelNetherlands
 
 
To
23/12/2003 11:18:45
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00861648
Message ID:
00861917
Views:
29
Hi Kevin,

My VFP example:
USE C:\DEV\CSHARP\DEMO\DEMOS\DATA\CLIENT IN 0
SELECT * FROM Client WHERE UPPER(Cl_Sname) = "LAWRENCE" INTO CURSOR TEST NOFILTER

=AFIELDS(laFields, "Testcursor")
StartTime = SECONDS()

cString = "<CLIENT>"
FOR nT = 1 TO ALEN(laFields,1)
	cString = cString +  "<"+laFields(nT,1)+">%%"+laFields(nT,1)+"%%<\"+laFields(nT,1)+">"
ENDFOR
cString = cString + "\<CLIENT>"

SET TEXTMERGE DELIMITERS TO "%%","%%"
SET TEXTMERGE TO cXml
SET TEXTMERGE ON 

\<TEST>
SCAN
	TEXTMERGE(cString,.T.)
ENDSCAN
\\</TEST>

SET TEXTMERGE OFF
SET TEXTMERGE TO
SET CONSOLE ON


cXml = FILETOSTR("cxml.txt")
?SECONDS() - StartTime
Anyway's you indeed have spotted a weak point in VFPs string handling. It becomes slow when appending lots of data to it. But as alway's there there are multiple ways to skin a cat, esspecially in a rich language like VFP.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform