Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set a primary key in a View
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00156919
Message ID:
00157227
Vues:
32
Eric,

Are you sure that's true? You definitely don't have to update the PK in a remote view. For example, if your back end is SQL Server and you use an identity column for your PK, you don't make the PK field in your view updatable and SQL Server fills in the value for you.

>Views only use primary keys if they are updateable. They use this in the SQL update statement that runs behind the scenes when you do a TABLEUPDATE().
>
>>Carla,
>>
>>You could try adding a field to the view like RECNO() AS RecNum then setting RecNum as the primary key. I think, however, that you need a primary key to use a view. Views use SQL commands and SQL commands don't work reliably with the record number.
>>
>>>I need to define a View from a table That do not have a primary Key. How can I define the Recnum number as primary key, because this unique.
>>>
>>>
>>>Thanks
>>>Carla
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform