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