Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capture return value
Message
 
À
08/01/2004 14:14:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00865134
Message ID:
00865189
Vues:
22
>If using tables, another option is to append a new record and replace instead of insert into. Then the record pointer will be positioned on the record you just added and you can retrieve its ID. I like Fabio's idea myself. Otherwise, you will have to consider the method in which you run the new id program as far as I know...
>
>>thanks for answering back Yuri. What if another user inserts info right after me, will I get the wrong ID? Are there other alternatives to capturing primary key inserted into tables through forms?
>>
>>thanks
>>Nick Patel
>>
>>>Why not just:
>>>?table_name.lnID_field
>>>
>>>>I am using a procedure that autoincrements (like newID) a table. In this procedure the last line has "Returns lnID". When I issue an insert into table, is there a way to capture this Return variable which gives me the new id number for table? I am issuing "insert into" from form but the procedure is run as default value in table.
>>>>
>>>>thanks
>>>>Nick Patel


If only microsoft would fix their new auto increment to retrieve id, then we wouldn't have to mickey-mouse around just to get an id. I'm updating my parent and child tables using views and I heard there were some concerns using auto-increment. I am going try fabio suggestion.

thanks
Nick Patel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform