>Your code works, but mine doesn't. I'm using a CursorAdapter with free tables. This is giving me an error:
>
>
>release oCA
>close all
>clear all
>set multilocks on
>use data\branch10\worder10
>? cursorsetprop("KeyFieldList", "id", "worder10")
>public oCA
>oCA=CREATEOBJECT("CursorAdapter")
>oCA.DataSourceType="NATIVE"
>oCA.SelectCmd="SELECT id, custno, wono FROM worder10"
>oCA.UpdatableFieldList="custno"
>oCA.UpdateNameList = "custno worder10.custno"
>oCA.Tables="worder10"
>*oCA.KeyFieldList = "ID"
>oCA.Alias="WOrderCursor"
>oCA.CursorFill()
>
>
>The error occurs when I browse WOrderCursor, change a CUSTNO value and attempt the update. It says "No key columns are specified for the update table WORDER10. Use the KeyFieldList property of the cursor." It's a bit confusing. I don't think I had any problems like this with tables in a DBC.
>
>Any help would be appreciated.
>
Hi Russell,
David already helped you to figure out that for your's scenario UpdateNameList and KeyFieldList properties both should include information about key fields. My example works without this information because it is doing only inserts and information about key fields is not needed for an insert.
Thanks,
Aleksey.