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:
00055035
Vues:
40
>>>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
>>
>>can you be more specific about which index doesn't exist ?
>>Do you have a view of the generatePK table ? If you do, try using the table directly.
>
>The primary key index. Using primary() on the view returns .f. because there are no indexes at all, at least not on mine. I used the table instead of a view on one form and it worked as expected, but when I use the view... I can use the table, but I want to understand why my view doesn't work when the views in the example seem to work. From what I can tell, I've got everything set up correctly in the view as far as updating goes (all the fields and send SQL updates) and I have the table name in the generatePK table.
>
>Why would I need a view of the generatePK table?
>
>Thanks
>Greg

you don't need a view of generatePK, I understood you had one !

I use views and have no problem adding / editing records. Which form are you using for data entry ?
Check the update tab in your view once again : what is the setting for SQL where clause and update using... ?
Christian Desbourse ( Belgium )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform