Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating CursorAdapter w/Free Tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01161323
Message ID:
01228778
Vues:
29
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform