Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert record and return value
Message
From
29/09/2004 22:14:20
 
 
To
29/09/2004 13:22:01
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00946845
Message ID:
00947389
Views:
21
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
Previous
Reply
Map
View

Click here to load this message in the networking platform