Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement