<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>11 Aug 2016 16:00:00 Z</lastBuildDate><pubDate>11 Aug 2016 01:07:00 Z</pubDate><description>Hello,&#13;
&#13;
Look at my scenario and what Im trying to do:&#13;
I have 2 windows that use a data file ("cfop_table" at my case);&#13;
I use HReadSeekFirst(cfop_table,id,522) at window 1;&#13;
Then I use HReadSeekFirst(cfop_table,id,514) at window 2;&#13;
When I call cfop_table.id at window 1 the Id is that 514 and not 522.&#13;
&#13;
I trying to solve it using variable type Record: _CFOP is Record of cfop_table at declaration of my window 1 and after the HReadSeekFirst(cfop_table,id,522) I assing to variable _CFOP = cfop_table the data file.&#13;
&#13;
But, when I try to modify (using HWrite(cfop_table)):&#13;
First I assign the Record variable to data file then I run the HWrite.&#13;
I used Trace to check the Id's before and after and its ok, but when I profile the SQL run the Update using the Id of Window 2 (UPDATE `cfop_table` SET `descricao` = 'testtt' WHERE `id`=514 -- Im using Neor Profile SQL).&#13;
I already tryied use HReset(cfop_table) before the assign of record variable to data file but the result is the same.&#13;
&#13;
Below is the code and Trace's:&#13;
&#13;
Trace("Trace1@Window 1# "+cfop_table.id,_CFOP.id) HReset(cfop_table) Trace("Trace2@Window 1# "+cfop_table.id,_CFOP.id) cfop_table = _CFOP Trace("Trace3@Window 1# "+cfop_table.id,_CFOP.id) IF HWrite(cfop_table) THEN Trace("Trace4@Window 1# "+cfop_table.id,_CFOP.id) END&#13;
Trace's output:&#13;
&#13;
Trace1@Window 2# 522 Trace2@Window 2# 514 Trace1@Window 1# 514 522 Trace2@Window 1# 0 522 Trace3@Window 1# 522 522 Trace4@Window 1# 522 522</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file/read.awp</link><title>[WD19] How to change key value of 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/59046-wd19-how-change-key-value-data-file-59054/read.awp</comments><pubDate>11 Aug 2016 16:00:00 Z</pubDate><description>Hi everybody&#13;
&#13;
2 other solutions:&#13;
&#13;
1. use halias in your second window&#13;
2. use hsaveposition and hrestoreposition when you ch…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59054/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59054/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file/read.awp">[WD19] How to change key value of data file?</source><title>Re: [WD19] How to change key value of data file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59056/read.awp</comments><pubDate>11 Aug 2016 15:54:00 Z</pubDate><description>Thanks you all for the replies!&#13;
&#13;
I didn't know the option 'Independent HyperFile Context', I tested and works perfect!&#13;
&#13;
Than…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59056/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59056/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file/read.awp">[WD19] How to change key value of data file?</source><title>Re: [WD19] How to change key value of data file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59055/read.awp</comments><pubDate>11 Aug 2016 15:32:00 Z</pubDate><description>Hi all,&#13;
&#13;
Or another solution close to Mark's solution: use a separate business layer tier to work with the data like I do in t…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59055/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59055/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file/read.awp">[WD19] How to change key value of data file?</source><title>Re: [WD19] How to change key value of data file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59052/read.awp</comments><pubDate>11 Aug 2016 14:29:00 Z</pubDate><description>Hi Hugo&#13;
&#13;
I agree with Peter, but if you want to use 1 window then you can't do that.&#13;
Option is to use an internal window for …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59052/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59052/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file/read.awp">[WD19] How to change key value of data file?</source><title>Re: [WD19] How to change key value of data file?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59051/read.awp</comments><pubDate>11 Aug 2016 09:53:00 Z</pubDate><description>Hi Hugo,&#13;
&#13;
In your Window description, make sure the 'Independent HyperFile Context' is flagged. If this is not the case, recor…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59051/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file-59051/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59046-wd19-how-change-key-value-data-file/read.awp">[WD19] How to change key value of data file?</source><title>Re: [WD19] How to change key value of data file?</title></item></channel></rss>
