|
-
March 27th, 2014, 06:53 PM
#2
Re: SQL current ID check returns same value twice.
Honestly, your approach of attempting to internally track id's within your app is going to be problematic. For one thing, if an insert error occurs, an id can be skipped (and throw off what your app thinks the next id will be).
If I were you, I would not try to track the id in my app, I would find an approach that inserts the record and then returns the new id to me.
One way to do this is to write a sproc that returns the Id as an OUT parameter.
Another way is to do this within Entity Framework.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|