CLOSE DATABASES ALL LOCAL bRetVal, cDataPath cDataPath = ADDBS(SYS(5) + SYS(2003)) SELECT 0 USE d:\projects\testdata\smts\bspotln ALIAS lines SELECT 0 USE d:\projects\testdata\smts\bspotdt ALIAS details oCA = CREATEOBJECT("CursorAdapter") WITH oCA .Alias = "Joined" .CursorSchema = "docid n(10,0),boid n(10,0),boidsml c(8,0),boidbase n(10,0),rectype c(1,0),docid2 n(10,0),boidbase2 n(10,0),boidsml2 c(8,0),dtid n(8,0),rectype2 c(1,0)" .DataSourceType = "Native" .KeyFieldList = "BoId, DtId" .SelectCmd = "select lines.docid, lines.boid, lines.boidsml, lines.boidbase, lines.rectype," +; "details.docid, details.boidbase, details.boidsml, details.dtid, details.rectype"+; " from lines " +; " join details on " +; "lines.boidbase = details.boidbase "+; "where lines.boid = 1097974" .Tables = "lines,details" .UpdatableFieldList = "docid,boid,boidsml,boidbase,rectype,docid2,boidbase2,boidsml2,dtid,rectype2" .UpdateNameList = "docid lines.docid,boid lines.boid,boidsml lines.boidsml,boidbase lines.boidbase,rectype lines.rectype,docid2 details.docid,boidbase2 details.boidbase,boidsml2 details.boidsml,dtid details.dtid,rectype2 details.rectype" ** Get the data bRetVal = .CursorFill(.T.) IF bRetVal ** Make changes CURSORSETPROP("Buffering", 5) REPLACE RecType WITH "Z", RecType2 WITH "Z" NEXT 1 BROWSE ** Save changes bRetVal = TABLEUPDATE() IF NOT bRetVal AERROR(aErrInfo) MESSAGEBOX(TRANSFORM(aErrInfo[1]) + " " + aErrInfo[2],48, "Error") ENDIF ELSE AERROR(aErrInfo) MESSAGEBOX(TRANSFORM(aErrInfo[1]) + " " + aErrInfo[2],48, "Error") ENDIF ENDWITH