Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving large xml recordset through ADO
Message
De
15/03/2003 12:13:29
 
 
À
14/03/2003 11:55:03
Leo Kool
Agis Automatisering BV
Harmelen, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00765479
Message ID:
00766197
Vues:
37
Hi Leo,

good idea. To get away from writing a file, you could use
TEXT TO <VAR> TEXTMERGE SHOW
** scan loop; use << >> textmerge to create entries
ENDTEXT
Hank

>Hi Kurt,
>
>Tried the Foxpro Advisor StringBuilder tip, that costs about 34 seconds, a lot better than 440. But I still wanted more. It ended up in using the VFP low level file functions, which costs abaut 2,5 seconds.
>
>
>lnSec = Seconds()
>lcFile = "c:\test.xml"
>Fclose(Fcreate(lcFile))
>liFile = Fopen(lcFile, 2) && buffered is faster
>Do While !.Eof
>	Fwrite(liFile, .Fields(0).Value)
>	.MoveNext()
>EndDo
>Fclose(liFile)
>lcXml = FileToStr(lcFile)
>Erase &lcFile
>?'String:  ', Seconds() - lnSec
>
>(The disadvantage is that you have to write a file to a disk.)
>>This month's issue of Foxpro Advisor also has an article on speeding up strings with XML by writing large amounts of data out to a file instead of writing to a memory variable, however through my testing, the above method is still much faster.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform