Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append/Add Record in View - Blank key field in table
Message
De
23/07/1999 14:32:14
 
 
À
23/07/1999 14:21:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00245336
Message ID:
00245463
Vues:
20
Lets just look at this part of the code.

<br>Just to let you know. If you surround your code with a <pre > tag it will preserve the tabbing.<br>
>



>select (tcTableName)
>dime aFlds(1)
>nNoFields = afield(aFlds)
>
>for lnKnt = 1 to nNoFields
> lcFieldName = tcViewName + "." + aFlds(lnKnt,1)
> lcUpdateField = tcTableName + "." + aFlds(lnKnt,1)
> lcFieldType = aFlds(lnKnt,2) + ;
> "(" + alltrim(str(aFlds

It looks like here that the keyfield is not updatable but the rest are.
I thinks you want all of your fields updatable.

(lnKnt,3)) + ")" )
> if aFlds(lnKnt,1) = cIDField
> DBSetProp(lcFieldName, 'Field', 'KeyField', .t.)
> DBSetProp(lcFieldName, 'Field', 'Updatable', .f.)
> else
> DBSetProp(lcFieldName, 'Field', 'KeyField', .f.)
> DBSetProp(lcFieldName, 'Field', 'Updatable', .t.)
> endif
> DBSetProp(lcFieldName, 'Field', 'UpdateName', lcUpdateField)
> DBSetProp(lcFieldName, 'Field', 'DataType', lcFieldType)
>endfor

HTH

Dan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform