ITs a simple textbox

ITs works as a ID no in a program. So a person cannot have similar id no..so how to do that..anyone>>>

If user enters the same number then display error message " you entered the same number" --when the user clicks the cmd.submit button.....

Recommended Answers

All 4 Replies

hi sudeep123, if you're working for a database.. you need to compare it to your recent data...

just checked id entered with id on database.
If same then display error message, if not same then add into database.

ITs a simple textbox

ITs works as a ID no in a program. So a person cannot have similar id no..so how to do that..anyone>>>

If user enters the same number then display error message " you entered the same number" --when the user clicks the cmd.submit button.....

THIS IS FOR VB 6.0

just checked id entered with id on database.
If same then display error message, if not same then add into database.

This is what I would recommend also.
You could perhaps have a method which adds the user to the database, and another method which updates the user if they already exist.
Then, you could check if they exist and if they do, run the update method. If they don't exist, run the add method.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.