>SET STEP ON >*** at this point the stat bar indicates that the cursor that populates a grid >*** that filters the remote view is in the current work area >nHandle =sqlconnect([MYsystemDSN]) >=sqlsetprop(nhandle, [Transactions], 2) >=SQLExec(nHandle, [SELECT * FROM Mytable]) >*** the work-area cursor is now SQLresult >=CURSORSETPROP('Tables', 'Mytable') >=CursorSetProp([KeyFieldList], [Track_no], [Mytable]) >=CursorSetProp([UpdatableFieldList], listupdate, [Mytable]) >=CursorSetProp([SendUpdates], .T., [Mytable]) >=CursorSetProp([UpdateNameList], listFields, [Mytable]) >SELECT Mytable >*** if the above line is used, the Watch window correctly indicates that >***Mytable.claim_no gets changed using the REPLACE statements below to the new value that was changed on the form. >***If it is commented out SQLresult.claim_no shows that it is >***changed. Neither case updates the back end. > >IF Thisform.mEdit= .T. > LOCATE FOR Track_no =Thisform.Track_no1.Value >ENDIF > DO CASE > CASE Thisform.TermChk.Value =.T. AND !EMPTY Thisform.TermDate1.Value) ; > AND !EMPTY(Thisform.cbo_Term1.Value) > Thisform.Mr_Stat1.Value =[T] > CASE Thisform.Mrchka.Value =.T. AND !EMPTY(Thisform.Mr_apr1.Value) > Thisform.Mr_Stat1.Value =[A] > CASE (Thisform.Mrchkd.Value =.T. AND !EMPTY(Thisform.Mr_Ref1.Value)) > Thisform.Mr_Stat1.Value =[D] > CASE (Thisform.Mrchkd.Value =.F. AND Thisform.Mrchka.Value =.F. ; > AND Thisform.TermChk.Value =.F. AND !EMPTY(Thisform.Mr_Sent1.Value)) > Thisform.Mr_Stat1.Value =[W] > CASE Thisform.Mrchkd.Value =.F. AND Thisform.Mrchka.Value =.F. ; > AND EMPTY(Thisform.Mr_Sent1.Value) > Thisform.Mr_Stat1.Value =[N] > ENDCASE > > WITH Thisform > REPLACE Clinic_ID WITH .Clinic_ID.Value > REPLACE Group_ID WITH .Group_ID.Value > REPLACE Mr_Stat WITH .Mr_Stat1.Value > REPLACE First_Name WITH .First_Name1.Value > REPLACE Last_Name WITH .Last_Name1.Value > REPLACE Init_date WITH .Init_Date1.Value > REPLACE Claim_no WITH .Claim_no1.Value > REPLACE From_Date WITH .From_Date1.Value > REPLACE To_Date WITH .To_Date1.Value > REPLACE Init_refu WITH .Init_refu1.Value > REPLACE Mr_Due WITH .Mr_Due1.Value > REPLACE Mr_apr WITH .Mr_apr1.Value > REPLACE Mr_ref WITH .Mr_ref1.Value > REPLACE Recon_due WITH .Mr_ref1.Value + cCarrlist.Recon_Days > REPLACE Mr_Sent WITH .Mr_sent1.Value > REPLACE Treat_Cost WITH .Treat_Cost1.Value > REPLACE DenyMedr WITH .cboDenyMR1.Value > REPLACE Terminat WITH .Termchk.Value > REPLACE TermDate WITH .TermDate1.Value > REPLACE TermReas WITH .cbo_Term1.Value > REPLACE DocCntrl WITH .DocCntrl1.Value > REPLACE MRchka WITH .MRchka.Value > REPLACE UPIN WITH .UPIN1.Value > REPLACE Carrier WITH .cboCarrier.Value > IF Thisform.Mrchka.Value =.T. > REPLACE Appr_date WITH .Mr_apr1.Value > ENDIF > REPLACE MRchkd WITH .MRchkd.Value > REPLACE Cnn_MR WITH .Cnn_Num1.Value > REPLACE Track_no WITH .Track_no1.Value > mSuccess=TABLEUPDATE(2, .F., [Mytable]) > If mSuccess > Messagebox([Table successfully updated],0+64,[Information]) > ELSE > Messagebox([Table not updated please check the code],0+64,[Information]) > ENDIF > IF mSuccess > SQLSuccess= SQLCOMMIT(nHandle) > IF SQLSuccess =1 > Messagebox([SQL COMMIT successfully completed],0+64,[Information]) > ELSE > Messagebox([SQL COMMIT NOT completed],0+64,[Error]) > ROLLBACK > ENDIF > ENDIF