Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need syntax help on dbsetprop() KeyField
Message
 
À
03/11/1998 21:35:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00153752
Message ID:
00154215
Vues:
19
>>>I'm trying to create an updatable view. My base table has a compound primary key such as Field1 + Field2 + str(Field3,8,0) + Field4.
>>>I can't quite figure out the syntax for the dbsetprop() command to set the key field.
>>
>>You don't have a single key field, but several. Therefore, judging from the documention, you should do
>>
>>dbsetprop(Field1, "Field", "KeyField", .T.)
>>dbsetprop(Field2, "Field", "KeyField", .T.)
>>dbsetprop(Field3, "Field", "KeyField", .T.)
>
>I don't think specifying more that one key is allowed. The expression specified should be specified as the key expression in the tables definition (I believe).

Yes, multiple KeyFields are allowed. If you create a view in the view designer and select multiple update keys, then run gendbc.prg you'll see that it uses the same exact approach that Mr. Wilden has suggested.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform