Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VMP, views and primary keys
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00054660
Message ID:
00054856
Vues:
36
>I recently began a project using VMP 2.01. I understand that VMP is designed to use views, so I set up some views. My problem occurs when I try to save new information. The way VMP tries to assign a primary key bombs on a view since that index doesn't exist in the view. Do I need to create this index? Should I go to stored procedures and bypass the default way to gen primary keys?
>
>Thanks
>Greg

I handle primary key generation in views by putting x3genpk('base table name','database') in the default value of my primary key field in the view. Don't SELECT * in your view definition, or your default value will disappear whenever you make changes to the base table.

I can't remember why I did it this way (I may have had the same problem as you), but it works great.

BTW, _upgrade_to_version_3.0_, especially if you're just starting a new project.
Darren Young
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform