Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append from Array with default value(primary key)
Message
De
15/01/2004 13:02:43
Scott Malinowski
Arizona Fox Software LLC
Arizona, États-Unis
 
 
À
09/10/2003 15:33:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00837014
Message ID:
00867206
Vues:
20
Chris,

That is a very good solution to the primary key problem. I've used a similar method except I use SCATTER FIELdS EXCEPT "primary key field name" MEMVAR MEMO and then APPEND BLANK and GATHER MEMVAR MEMO. This works the same way if you are using NEWID() as the default for the primary key generation.

With this is mind, allow me add a twist to this whole thing. I have a parameterized view that happens to have the parameter as a single primary key field value. So, I can get the view working just fine and the tableupdate generates the next primary key with no problem. The dilema is I don't know what the primary key is and I can't requery() the view because the primary key IS THE PARAMETER!!!!

In this case, I need to get the NEW primary key so I can append records to some other (CHILD) tables based on this primary key. Any idea how to get that primary key in the view without trying a requery()? I tried Refresh() and it returns 0 records because the view primary key field still has a value of zero.

Thanks!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform