oCsr=CREATEOBJECT('CursorAdapter') oCsr.DataSourceType="NATIVE" oCsr.SelectCmd="SELECT * FROM '"+ADDBS(HOME())+"Samples\Northwind\customers' where customerid='A'" oCsr.Alias="Northwind_Customers" oCsr.CursorFill()The main problem is that you didn't specify the DataSourceType and you misunderstood the concept of CursorAttach. With CursorAttach, you attach a Cursor (as in a View) to the Adapter so that all tableupdates of that Cursor will use the settings en code of the CursorAdapter. If you want to specify the tables for a given SelectCmd, so that you can update them, put them in the tables property.
oCsr=CREATEOBJECT('CursorAdapter') oCsr.DataSourceType="NATIVE" oCsr.SelectCmd="SELECT * FROM '"+ADDBS(HOME())+"Samples\Northwind\customers' where customerid='A'" oCsr.Tables="customers" oCsr.Alias="Northwind_Customers" oCsr.CursorSchema="CUSTOMERID C(5), COMPANYNAME C(40), CONTACTNAME C(30), CONTACTTITLE C(30), ADDRESS C(60), CITY C(15), REGION C(15), POSTALCODE C(10), COUNTRY C(15), PHONE C(24), FAX C(24)" oCsr.KeyFieldList="CUSTOMERID" oCsr.UpdateNameList="CUSTOMERID CUSTOMERS.CUSTOMERID, COMPANYNAME CUSTOMERS.COMPANYNAME, CONTACTNAME CUSTOMERS.CONTACTNAME, CONTACTTITLE CUSTOMERS.CONTACTTITLE, "+"ADDRESS CUSTOMERS.ADDRESS, CITY CUSTOMERS.CITY, REGION CUSTOMERS.REGION, POSTALCODE CUSTOMERS.POSTALCODE, COUNTRY CUSTOMERS.COUNTRY, PHONE CUSTOMERS.PHONE, FAX CUSTOMERS.FAX" oCsr.UpdatableFieldList="CUSTOMERID, COMPANYNAME, CONTACTNAME, CONTACTTITLE, ADDRESS, CITY, REGION, POSTALCODE, COUNTRY, PHONE, FAX" oCsr.WhereType= 1 &&DB_KEY oCsr.CursorFill() REPLACE country WITH IIF(country="Germany","The Netherlands","Germany") FOR CUSTOMERID="ALFKI" TABLEUPDATE(.t.) ? _TallyI Used _Tally here because that one will give you the amount of records updated with the TableUpdate.
oCsr = CREATEOBJECT('CursorAdapter') >oCsr.CursorAttach('Test') && where Test is a local VFP table >oCsr.SelectCmd = 'SELECT * FROM Test' >oCsr.CursorFill() >>