* Create a couple of test cursors: CREATE CURSOR AA ; ( cString C( 2 ) ) CREATE CURSOR BB ; ( cString C( 2 ) ) * Add blank rows to each, so neither is at EOF() during subsequent REPLACEs: SELECT AA APPEND BLANK SELECT BB APPEND BLANK * REPLACE in AA while BB is selected, without IN clause: REPLACE AA.cString WITH "AA" SELECT AA * REPLACE in BB while AA is selected, without IN clause: REPLACE BB.cString WITH "BB" ? "Results 1", AA.cString, BB.cString * Now create a third cursor with no rows: CREATE CURSOR CC ; ( cString C( 2 ) ) SELECT CC REPLACE AA.cString WITH "XX", BB.cString WITH "YY" && fails, no rows/EOF() in currently selected cursor ? "Results 2", AA.cString, BB.cString * Use IN clause to "perform" the REPLACE in a work area that is not at EOF(): REPLACE AA.cString WITH "XX", BB.cString WITH "YY" IN AA ? "Results 3", AA.cString, BB.cString * Just to be contrary, use IN with CC while AA is the current alias: SELECT AA REPLACE AA.cString WITH "VV", BB.cString WITH "WW" IN CC && fails, no rows/EOF() in cursor specified by IN clause ? "Results 4", AA.cString, BB.cStringSo yes, there are some of the benefits you mention by using the IN clause, especially if you're only REPLACEing in a single table. But it's slightly misleading; what the IN clause actually does is instruct the REPLACE to execute "in" a work area that has a table that (hopefully) is not at EOF().
>>>>>PARAMETERS l_check >>>>> >>>>>* l_check values >>>>>* 1 = yes >>>>>* 2 = no >>>>>SET STEP ON >>>>> >>>>>thisform.pageframe1.page1.tol_no.Value = 0 >>>>>thisform.pageframe1.page1.tol_yes.Value = 0 >>>>> >>>>> >>>>>IF thisform.isloading AND thisform.isediting then >>>>> l_check = VAL(jcpmt.tolerance) >>>>>ELSE >>>>> replace jcpmt.tolerance WITH ALLTRIM(STR(l_check)) >>>>>ENDIF >>>>> >>>>>IF l_check = 1 &&yes >>>>> thisform.pageframe1.page1.tol_yes.Value = 1 >>>>>ELSE >>>>> thisform.pageframe1.page1.tol_no.Value = 1 >>>>>ENDIF >>>>> >>>>>thisform.pageframe1.page1.tol_yes.Refresh >>>>>thisform.pageframe1.page1.tol_no.Refresh >>>>>>>>>>
replace jcpmt.tolerance WITH ...whatever... in jcpmt>>>>