Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in view
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00216702
Message ID:
00217157
Vues:
19
>>>Vinod,
>>>
>>>If you want to use a view to update a table that table must have a primary key. There's no way around that. You could get rid of the view and update the table directly using buffering.
>>
>>Actually you can - just create a simple test and see
>>
>>Arnon
>
>Arnon,
>
>Yes, you can create a view on a table that doesn't have a primary key, but the results are not exactly desireable. The problem Vinod was having was caused because he used a foreign key instead. When he deleted one record with a given foreign key value, all records with that value were deleted.

Arnon and Vinod,

I think I need to clarify what I'm saying here. It doesn't matter whether any field in your table is defined as a primary key. What does matter is that you have to have a field or combination of fields that's unique for each record. You could mark all the fields as part of the key if you know that each record will be unique. That might not give you great performance, but it will work as long as you don't have any duplicate records.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform