>>>o = newobject('myCAClass','myCa.lib') >>>o.CursorFill() >>>browse >>>make changes >>>?tableupdate(.t.,.t.) >>>?o.cursorrefresh() >>>>>>
>>*** Form DefineCA Method >>this.addproperty('oCA') >>this.oCa = createobject([CursorAdapter]) >> >>text TO this.oCa.SelectCmd PRETEXT 15 NOSHOW >> select * from biditems >> inner join lineitemspecs >> on biditems.lineitemid = lineitemspecs.lineitemid >> where biditems.projectphaseid = ?m.lnValue >>ENDTEXT >> >>this.oCa.allowinsert = .t. >>this.oCa.insertcmd = "" >>this.oCa.buffermodeoverride = 5 && 3 = row buffering, 5 = table buffering >>this.oCa.datasourcetype = [NATIVE] && native fox datasource >>this.oCa.sendupdates = .t. && unnecessary except with ODBC or ADO >>this.oCa.wheretype = 1 >>this.oCa.tables = [biditems,lineitemspecs] >>this.oCa.fetchsize = -1 && primarily for remote views >>this.oCa.keyfieldlist = "biditemid" && the primary key for the table >>this.oCa.updatenamelist = "lineitemest biditems.lineitemest," + ; >> "lineitemqty biditems.lineitemqty" >> >>m.lnValue = 0 >>this.oCa.updatablefieldlist = "lineitemest, lineitemqty" >>this.oCa.alias = "CA1" >> >>IF NOT this.oCa.cursorfill() >> AERROR(laError) >> MESSAGEBOX([Cannot open CursorAdapter ] +laError[1,2]) >> RETURN .f. >>ENDIF >>RETURN .t. >>************* END OF DefineCA Method >>>>Note that the KeyFieldList clearly specifies 'biditemid' as the primary key. This field IS a primary key in the table. The updateable fields are also clearly specified.