Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 972069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:03:49+00:00 2026-05-16T03:03:49+00:00

This is just a general question irrespective of database architecture. I am maintaining an

  • 0

This is just a general question irrespective of database architecture.
I am maintaining an ASP.NET web application. The structure is such that,

Say on ‘Add a new employee’ webform

  • The primary key (or the record id to
    be saved with) is initially loaded on form
    load event & displayed as a label

    • So when the form loads, the record id to save with is shown to the user

Positives:

  • End user already knows what the id/serial of the form is (even before he saves the form)
  • So on form save when he is directed
    to gridview screen (with all entries)
    he can search records easily
    (although the most recent one is at
    the top anyway)

Negatives:

  • If he does not save the form, say he
    just cancels after loading the data entry form,
    the id/key initially fetched is
    wasted (in my case it is a sequence
    field fetched on form load from database)

What do you guys do in these scenarios ? Which approach would you recommend for ‘web applications’? And how to facilitate the user with a different approach ? Is our current approach recommended (To me,it wastes the ids/sequence from database)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:03:50+00:00Added an answer on May 16, 2026 at 3:03 am

    I’d always recommend not presenting the identity field value for the record being created until the record has been created. The “create a temporary placeholder record first to obtain the identity field value ahead of time” approach can, as you mention, result in wasted IDs, unless you have a process in place to reclaim them.

    You can always pop-up a message box when the user presses save that tells them the identity field value of the newly created record.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is just a general knowledge question. Why havent I ever come across any
Although I'm programming in C++, this is more of a general question about design.
First of all, I apologize for yet another interface question. I thought that this
This is a general question on how Features should be created when we have
This is more of a general question about the distinctions between these four different
This is more of a general question as I have found relatively little information
I am not sure if this general question is even allowed in here but
I'm not sure if there is an Android way to do this or if
I recently dove headfirst into a project that uses nHibernate heavily. I've gotten a
I am working on a project right now that uses an accordion style menu,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.