Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert record and return value
Message
De
29/09/2004 22:14:20
 
 
À
29/09/2004 13:22:01
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00946845
Message ID:
00947389
Vues:
20
Jerry,

One last thing, after reading a series of messages over on the Fox forum today (check out thread #947113).

If you create a stored procedure in VFP to handle your insert, it's actually pretty easy. An insert will automatically position the record pointer to the row that was inserted. So you could immediately read the value of the auto-inc field and return the value, and your .NET code could receive it.

An example of executing a stored proc in .NET and getting a return value can be found in message #946242.

If you don't want to use a stored proc - then the only thing I can suggest is that if you can uniquely identify the inserted row through a combination of other columns (preferably for which a tag exists), you could do a subsequent SELECT query to retrieve the row.

I'd probably lean towards the stored proc.

Kevin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform