<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>5 Feb 2018 23:31:00 Z</lastBuildDate><pubDate>5 Feb 2018 18:31:00 Z</pubDate><description>While updating a field in a file from some other data (HF files imported from XLS) I came upon the following problem using the following code:&#13;
arrFiles is array of strings = ["Beans$","Choc$","Frozen$","Fruit$","Grains$","Juice$","Misc$","Nuts$","Olives$","Pasta$","PB$","Snacks$","Spices$"]&#13;
sFile, sItem, sTmp, sSC_Code is string&#13;
i, nMax is int&#13;
nMax = ArrayCount(arrFiles)&#13;
FOR i = 1 TO nMax&#13;
sFile = Upper(arrFiles)&#13;
HReadFirst(sFile)&#13;
WHILE NOT HOut(sFile)&#13;
sSC_Code = ""&#13;
sItem = {sFile +".Item"}&#13;
IF sFile = "SPICES$" THEN&#13;
sSC_Code = NoSpace({sFile +".ScaleCode"})&#13;
ELSE&#13;
sTmp = NoSpace({sFile +".SC_CODE"})&#13;
IF Left(sTmp,1) = "S" THEN&#13;
sSC_Code = sTmp // SCCODE&#13;
END&#13;
END&#13;
HReadSeekFirst(TNF_Item,ITMDESC,sItem) // THIS FAILS&#13;
IF HFound(TNF_Item) THEN // AND OF COURSE SO DOES THIS&#13;
TNF_Item.SCODE = sSC_Code&#13;
HModify(TNF_Item)&#13;
ELSE&#13;
Info(sItem +" not found!")&#13;
END&#13;
HReadNext(sFile)&#13;
END&#13;
END&#13;
&#13;
The ITMDESC in TNF_Item is defined as string[50] unique key. The results shown in Step1.png and Step2.png don't seem to make any sense. Step1 shows status just before HReadSeekFirst and Step2 shows just after.&#13;
[attachment 2580 Step1.png]&#13;
[attachment 2581 Step2.png]</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file/read.awp</link><title>corrupt data file?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-solved-finally-64415/read.awp</comments><pubDate>5 Feb 2018 23:31:00 Z</pubDate><description>I finally figured it out AND I think I had this problem once before and someone (probably Fabrice) pointed out the solution. Whe…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-solved-finally-64415/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-solved-finally-64415/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file/read.awp">corrupt data file?</source><title>Re: corrupt data file? [Solved] - finally</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-solved-sort-64413/read.awp</comments><pubDate>5 Feb 2018 21:01:00 Z</pubDate><description>It was unfortunate that the first item in the file was # 817 Basmati Rice since the reason that it couldn't be found was due to …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-solved-sort-64413/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-solved-sort-64413/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file/read.awp">corrupt data file?</source><title>Re: corrupt data file? [SOLVED] - sort of</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-64412/read.awp</comments><pubDate>5 Feb 2018 19:31:00 Z</pubDate><description>Hi&#13;
&#13;
I guess you have only double-quote string issue ie parsing problem.&#13;
&#13;
Pls see below&#13;
&#13;
sDQ is string = """"&#13;
sSql is stri…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-64412/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file-64412/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/64410-corrupt-data-file/read.awp">corrupt data file?</source><title>Re: corrupt data file?</title></item></channel></rss>
