<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi Jaime:<BR>
&nbsp;&nbsp;&nbsp; <BR>
&nbsp;&nbsp;&nbsp;The problem is that you have read the master_file in the access statement<BR>
&nbsp;&nbsp; and have&nbsp; updated it in an&nbsp;OUTPUT statement.<BR>
&nbsp;&nbsp; When that happens QTP creates a two pass request.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1) Write all the input to disk i.e. QTPSCR.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2) Read QTPSCR and process ITEM and OUTPUT statements.<BR>
&nbsp;&nbsp; <BR>
&nbsp;&nbsp; QTP uses the checksum from the access statement in pass 1 to compare with<BR>
&nbsp;&nbsp;&nbsp;the checksum of the record it has read just before the update.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp; So if you have linked to a record more than one in the access statement<BR>
&nbsp;&nbsp; and you try to update it more than once you will get the message. The<BR>
&nbsp;&nbsp;&nbsp;checksums don't match because you have changed the file on the first <BR>
&nbsp;&nbsp;&nbsp;execution of the OUTPUT statement for that link value.<BR>
&nbsp;<BR>
&nbsp;&nbsp;&nbsp;You can&nbsp;use an&nbsp;ALIAS your master_file in the OUTPUT statement<BR>
&nbsp;&nbsp;&nbsp;This will cause the QTP to read the master_file twice during the execution<BR>
&nbsp;&nbsp; of the OUTPUT statement. QTP uses the checksum from the first ALIAS read<BR>
&nbsp;&nbsp;&nbsp;to compare with the checksum of the record it has read just before the update.<BR>
&nbsp;&nbsp; <BR>
&nbsp;&nbsp;&nbsp; It is a good idea to include a VIA clause on your<BR>
&nbsp;&nbsp;&nbsp; OUTPUT &lt;master&gt; UPDATE. Otherwise QTP&nbsp;will&nbsp;use a&nbsp;record number&nbsp;to<BR>
&nbsp;&nbsp;&nbsp; re-read the master. Your record may have migrated since the<BR>
&nbsp;&nbsp;&nbsp; access was executed.&nbsp;<BR>
&nbsp;&nbsp;&nbsp; <BR>
&nbsp;Regards,<BR>
&nbsp;Peter Bateman<BR>
&nbsp;&nbsp;&nbsp; <BR><BR>&gt; From: markus.grossrieder@tele2.ch<BR>&gt; To: jarqueza@gmail.com; powerh-l@lists.sowder.com<BR>&gt; Subject: Re: Error updating master file<BR>&gt; Date: Sun, 10 Aug 2008 13:26:24 +0200<BR>&gt; <BR>&gt; Hi Jaime,<BR>&gt; <BR>&gt; you need to put a sort (or sorted) command, then add the "at sortkey" option <BR>&gt; to your output,<BR>&gt; something like this (air code):<BR>&gt; <BR>&gt; access file-A link to master_file opt<BR>&gt; sort on file-A-key<BR>&gt; ...<BR>&gt; output master_file update add at file-A-key<BR>&gt; item field_1 final d_field<BR>&gt; <BR>&gt; HTH, regards,<BR>&gt; Markus<BR>&gt; <BR>&gt; ----- Original Message ----- <BR>&gt; From: Jaime A<BR>&gt; To: powerh-l@lists.sowder.com<BR>&gt; Sent: Sunday, August 10, 2008 7:48 AM<BR>&gt; Subject: Help: Error updating master file<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Hi<BR>&gt; <BR>&gt; I need help to update a file. Here is my program<BR>&gt; <BR>&gt; access file-A link to master_file opt<BR>&gt; <BR>&gt; contains some manipulation<BR>&gt; <BR>&gt; output master_file update add<BR>&gt; item field_1 final d_field<BR>&gt; <BR>&gt; When I run the above program, it will bomb saying the record being updated <BR>&gt; has been changed.<BR>&gt; <BR>&gt; The relationship of file-A to master_file is many-to-one. How would I be <BR>&gt; able to update my master_file ?<BR>&gt; <BR>&gt; Thanks in advance,<BR>&gt; Jaime<BR>&gt; <BR>&gt; Hi<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; No virus found in this incoming message.<BR>&gt; Checked by AVG - http://www.avg.com<BR>&gt; Version: 8.0.138 / Virus Database: 270.6.0/1602 - Release Date: 8/9/2008 <BR>&gt; 1:22 PM<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; -- <BR>&gt; = = = = = = = = = = = = = = = = = = = = = = = = = = = =<BR>&gt; Mailing list: powerh-l@lists.sowder.com<BR>&gt; Subscribe: 'subscribe' in message body to powerh-l-request@lists.sowder.com<BR>&gt; Unsubscribe: 'unsubscribe &amp;lt;password&amp;gt;' in message body to <BR>&gt; powerh-l-request@lists.sowder.com<BR>&gt; http://lists.sowder.com/mailman/listinfo/powerh-l<BR>&gt; This list is closed, thus to post to the list you must be a subscriber.<BR>&gt; Add 'site:lists.sowder.com powerh-l' to your search terms to search the list <BR>&gt; archive at Google. <BR>&gt; <BR>&gt; -- <BR>&gt; = = = = = = = = = = = = = = = = = = = = = = = = = = = =<BR>&gt; Mailing list: powerh-l@lists.sowder.com<BR>&gt; Subscribe: 'subscribe' in message body to powerh-l-request@lists.sowder.com<BR>&gt; Unsubscribe: 'unsubscribe &amp;lt;password&amp;gt;' in message body to powerh-l-request@lists.sowder.com<BR>&gt; http://lists.sowder.com/mailman/listinfo/powerh-l<BR>&gt; This list is closed, thus to post to the list you must be a subscriber.<BR>&gt; Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.<BR><BR><br /><hr /> <a href='' target='_new'></a></body>
</html>