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 8258889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:42:02+00:00 2026-06-08T02:42:02+00:00

In my web application I have a simple employee form. Each employee has a

  • 0

In my web application I have a simple employee form. Each employee has a unique id associated with it.

When a new employee is added to the system, a unique id is assigned to him. This id can be assigned manually or can be generated by the system.

We have a table where we have a single column with a number stored in it. It gets incremented by 1.

So if we have the table has a value of 10. System will auto generate an id of E0011 for next employee.

And the value in the table is updated to 11.

We have a button near “id” textfield. If user clicks on this button a new system generated id is created and populated in the id field.

Now, the problem is user can click on this field multiple times and generate the next id so the previous id is lost or consumed.

How do I prevent user from createing multiple ids?

  • 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-06-08T02:42:04+00:00Added an answer on June 8, 2026 at 2:42 am

    Simple, don’t allow manual generation of IDs. In the first place, you have an automatic ID generator – why use it manually?

    Let the system generate the ID (similar to auto-increment in MySQL) when his record is entered into the system. That way, the system controls the IDs (1 person = 1 id) and therefore no problem.


    If you really want to go through the difficult route and manually generate IDs, then have an ID checker. This queries the database for that manually entered ID before inserting a record using that ID. If the ID is already in the system, then the insert fails. If not used yet, then proceed inserting the record.

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

Sidebar

Related Questions

I'm currently working on a simple web application where users each have their own
I have simple web application (asp.net - ajax) I have a web form which
I have a simple web application in which I have created a wizard, each
I have a simple web application written in java which has servlets accessing the
I have what seems to be a simple employee time request web application I
I have a simple web application which lets the user upload local user data
I have written a simple web Application which is running(on Tomcat Server) fine on
We have a very simple ASP.NET web application comprising mostly static content and a
I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate
I have a war file which is a simple dynamic web application where I

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.