******************************************************************** * Description.......: RunCommand - executes passed commands * Calling Samples...: * Parameter List....: tcCommand, tcNullCommand, tcFor * Created by........: Nadya Nosonovsky 07/30/2002 03:28:32 PM * Modified by.......: ******************************************************************** lparameter tcCommand, tcNullCommand, tcFor local lnSize, lcType, lnChanged, lnSelect, lcCreate with thisform lcType = .cFieldType lnSize = .nFieldSize lnSelect = select() use in select('curPreview') select 0 lcCreate=[create cursor curPreview (OldFldVal ]+ ; m.lcType+' ('+ transform(m.lnSize)+ ; '), NewFldVal '+ m.lcType+' ('+ transform(m.lnSize)+'))' &lcCreate && Create cursor curPreview lnChanged = 0 select (.cProcessTable) scan &tcFor if m.plStop exit endif if .CommandFail exit endif OldFldVal = evaluate(.cProcessTable+"."+.TargetFld) &tcCommand lnChanged = m.lnChanged +1 if .ConvNull and not .CommandFail &tcNullCommand && If new field empty - replace with a null endif &&End of 2/7/02 change NewFldVal = evaluate(.cProcessTable+"."+.TargetFld) insert into curPreview from memvar endscan endwith select curPreview go top browse use && Close select (m.lnSelect) return m.lnChangedI have 10 records in the file. I execute this method for ALL records (tcFor = 'ALL'). My cursor curPreview shows only 1 record with incorrect values. The message is saying, that only 1 record was changed. Yet I see, that all 10 records were changed correctly. Could you please tell me, what's wrong?