Thanks a lot
Main Topics
Browse All TopicsGreetings again,
On the surface, the code below looks simple enough but for some reason, it isn't working.
History, I have 2 conditional if statements. The first statement checks to see if an ID already exists on the DB. If no, then it allows the user to create one.
If one already exists, the user is given a friendly message that the ID s/he is attempting to select already exists,
The other conditional is that if an ID already exists, is this ID the mainID. MainID is determined by either a Yes, or Y or 1 (the number one).
If this ID is the mainID, the user is notified and asked to either change the ID from being the mainID to just a regular ID and then make the current ID the main ID or make the currentID just a regular ID.
The Problem.
2 problems exist so far.
1, I don't get the message that says, an ID already exists. All I get is that the ID the user is about to enter is the mainID.
A bigger issue, though and this is the second issue, is that even if I try entering a completely new number that doesn't exist on our DB, I still get a message that this is the mainID.
What is wrong with this code, please?
Many thanks in advance.
Please see code below
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: hongjunPosted on 2009-09-19 at 04:06:42ID: 25372432
Your SQL condition may be wrong.
Try this
Select allOpen in new window