<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>10 Dec 2020 12:13:11 Z</lastBuildDate><pubDate>9 Dec 2020 18:56:02 Z</pubDate><description>hi,&#13;
I have a procedure that has to read a txt file of more than 50,000 lines. I currently use this code:&#13;
&#13;
// Read a data file in TXT (import)&#13;
&#13;
sFileContent	is string&#13;
sLine			is string&#13;
sTiporec		is string&#13;
sCodpag			is string&#13;
sCassa			is string&#13;
sImporto		is string&#13;
sGiorno			is string&#13;
&#13;
IF EDT_PercFile = "" OR EDT_pagamento="" THEN&#13;
ToastDisplay("Dati NON Validi",toastLong,vaBottom,haCenter)	&#13;
ELSE&#13;
// Load the file content in memory&#13;
ControlVisible(PROGBAR_Horizontal,animScrollBottom,50)&#13;
&#13;
sFileContent = fLoadText(EDT_PercFile)&#13;
&#13;
&#13;
	// Initializes the progress bars to their initial value&#13;
	PROGBAR_Horizontal	= PROGBAR_Horizontal..InitialValue&#13;
			&#13;
FOR EACH STRING sLine OF sFileContent SEPARATED BY CR&#13;
	// Process the line			&#13;
	sTiporec	= Middle(sLine, 13, 2)&#13;
	sCodpag		= Middle(sLine, 15, 2)	&#13;
		&#13;
	IF sTiporec = "03" AND sCodpag=EDT_pagamento THEN&#13;
		sCassa		= Middle(sLine, 7, 2)&#13;
		sImporto		= Middle(sLine, 20, 6)&#13;
		sGiorno	= Middle(sLine, 65, 14)&#13;
		&#13;
			// Increments the value of all the progress bars&#13;
			PROGBAR_Horizontal++				&#13;
		HExecuteQuery(QRY_insert1,hQueryDefault,sImporto,sGiorno,sCassa,"")		&#13;
		END	&#13;
END&#13;
&#13;
	ListDisplay(COMBO_Combobox, taReExecuteQuery)&#13;
	&#13;
	&#13;
	TableDisplay(TABLE_QRY_TabTrasn,taReExecuteQuery)&#13;
	&#13;
	&#13;
	&#13;
	LooperDisplay(LOOP_QRY_TotCassa,taReExecuteQuery)&#13;
	&#13;
	&#13;
	ControlInvisible(PROGBAR_Horizontal,animScrollBottom,50)&#13;
	&#13;
ToastDisplay("FATTO",toastShort,vaBottom,haCenter)&#13;
&#13;
&#13;
&#13;
END&#13;
&#13;
&#13;
but if the file were bigger I could have problems? are there better methods?</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file/read.awp</link><title>big txt file</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Lapalys</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file-68177/read.awp</comments><pubDate>10 Dec 2020 12:13:11 Z</pubDate><description>My answer has been deleted !&#13;
&#13;
Here is a code to read big txt file quickly : https://wlplus.org/fr/txtfile/&#13;
&#13;
--&#13;
Bon dev.&#13;
&#13;
…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file-68177/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file-68177/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file/read.awp">big txt file</source><title>Re: big txt file</title></item><item><author>jeanphi.news</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file-68176/read.awp</comments><pubDate>10 Dec 2020 10:12:01 Z</pubDate><description>marcov avait écrit le 09/12/2020 :&#13;
&gt; hi,&#13;
&gt; I have a procedure that has to read a txt file of more than 50,000 lines. I &#13;
&gt; cur…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file-68176/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file-68176/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68174-big-txt-file/read.awp">big txt file</source><title>Re: big txt file</title></item></channel></rss>
