|
hi,
i need help to check the avaialbility of username from database. i am developing this website in a .net 3 tier framework. i already search for coides through google but all the codes are in 2 tier based. please help..............
|
|
|
|
|
We can't give you any specifics, because you don't give us any specifics.
But basically, you want to run a query on the database which is along the lines of:
SELECT COUNT(userName) FROM myTable WHERE userName='DoesThisExist' If it returns a non-zero value, then the username exists.
(By preference, make this a parametrized query, or you leave your database open to SQL Injection attack which can damage or destroy it)
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
The number of tiers doesn't matter.
|
|
|
|
|
Don't get so hung up on "3 tier" and stuff like that.
You have a very specific problem you are trying to solve so just focus on that alone.
What you need to do is run a query against your database to check if a value exists. That's it.
public bool UserNameExists( string username )
{
}
I wasn't, now I am, then I won't be anymore.
|
|
|
|