Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering, Views and primary keys
Message
De
23/02/2000 06:17:43
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
À
23/02/2000 01:02:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00335702
Message ID:
00335892
Vues:
11
>>Confused again!!!
>>
>>I have a table GROUP, w/primary key GROUPID. The primary key is assigned as the default value of GROUPID, w/a call to a GetKey( "GROUP" ) routine. Another table, PACSEA, has one or more entries w/a foreign key of GROUPID.
>>
>>I need to have the value for GROUPID before I write any records in PACSEA. This must be a common thing that people do, yet I'm having trouble figuring out the sequence.
>>
>>I am trying to use views to update both tables and am having trouble when creating a new group. Where should the GetKey call be? in the view or in the underlying table, or both?
>>
>
>I put mine in the table, and when appending a new record into a view, call the NewID function manually, and place the results in the view record. The primary key field in the view must be set to updatable for this to work.

Thanks Erik...it all works fine now, w/your suggestion. This has been bothering me for a long time and now, the solution seems so simple! J
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform