Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
John
Sounds to me like you are not sending a value to the PK and the column does not accept nulls. You need to make sure that you have the PK in your remote view checked to update the fields which is not the default behavior. There should be two check marks beside the column in the view designer. There is really no reason to remove the PK setting in your database to make this work.
>Cetin,
>Thanks for the reply. I'm not sure if the default would help here. I'm not sure I explained it correctly the first time through. The id field in the SQL table is set as that table's primary key. I had to remove the primary key setting from it in order to make this work. As all the data is handled from VFP, I'm just handling incrementing that key myself. In the vfp view, I had every field (including the one in question) marked as updatable. I don't know what I have set up wrong, but I can't insert into SQL if that field is marked as the primary key on the SQL server. If you have any suggestions, that would be great. Thanks again, have a good day,
>
>jfh
>
>
>>Sounds like it doesn't have a default value on MS SQL side and in view designer is not marked as updatable.
>>Either have a default value defined on SQL server side or populate at VFP side and mark as updatable (check the one with a mark under keyfield).
>>From its name it looks like it's the key field. If so a surrogate autogenerated key (ie: a uniqueidentifier type) would be good.
>>Cetin
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement