Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert record and return value
Message
From
29/09/2004 13:56:18
 
 
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:
00947277
Views:
15
Jerry,

As a follow-up, you might want to post a message over on the VFP forum regarding ways to determine the auto-inc value from an insertion. I know the question has been asked before, and I don't recall any responses, but you might want to try anyway.

I mentioned further down this thread yesterday that one way might be to do your insertion as part of a stored proc, maybe inside a transaction, and then find some way to 'get to' the row you just inserted.

Perhaps the table you're inserting into has a combination of columns that are unique (invoice #, order #, ssn #, etc.)...you could query against the value that you inserted to get the auto-inc value. If not, 'maybe' you could do a MAX on the auto-inc column or something like that, but I would want to do a great deal of testing, especially if it's in a multi-user environment.

But I have not tried these myself, you may want to ask others on the fox forum and/or give these a try yourself).

Again, sorry for taking you down a dead-end! (I just posted a final message, after seeing this topic discussed on the fox forum today, that may be of some help)
Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform