Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert into and record pointer question
Message
De
29/08/2009 19:00:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01421693
Message ID:
01421695
Vues:
46
Should work fine.

>Hi,
>
>I have a situation where a record is inserted in one table and then immediately after that a record is inserted in another table where one of the fields will get a value of PK from the 1st insert. And I want to include in the second INSERT this value. But I want to be sure that VFP always stays (in terms of record pointer) on the newly inserted record (until, of course, something else occurs - like updating the table or whatever). Therefore, can I rely on VFP to stay on this newly inserted record?
>
>Here is a pseudo example of what I am doing:
>
>
>*-- Suppose that AUTO PK generation is used
>INSERT INTO TABLE1 (FLD1, FLD2) value ("Val1", "Val2")
>INSERT INTO TABLE2 (FLD1, FLD2, TBL1PK) values ("SomeVal1","SomeVal2",TABLE1.PK_VALUE)
>
>
>Please let me know what you think.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform