Click here to Skip to main content
15,891,829 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to check the avaialbility of username from database Pin
fjdiewornncalwe29-Jan-13 5:11
professionalfjdiewornncalwe29-Jan-13 5:11 
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.
C#
public bool UserNameExists( string username )
{
   // Connect to your database...

   // Run a query to check if username exists. 
   // NOTE: Use a paramatarized query.
   // Something like: SELECT count(*) FROM [YourUserTable] WHERE [YourUserNameColumn] = @username
}

I wasn't, now I am, then I won't be anymore.

QuestionLearning C# .Net - From where to start.? Pin
mbatra3128-Jan-13 19:21
mbatra3128-Jan-13 19:21 
AnswerRe: Learning C# .Net - From where to start.? Pin
OriginalGriff28-Jan-13 21:23
mveOriginalGriff28-Jan-13 21:23 
AnswerRe: Learning C# .Net - From where to start.? Pin
Richard MacCutchan28-Jan-13 22:53
mveRichard MacCutchan28-Jan-13 22:53 
AnswerRe: Learning C# .Net - From where to start.? Pin
Abhinav S29-Jan-13 19:02
Abhinav S29-Jan-13 19:02 
QuestionSocket programming Pin
Naina Dhande28-Jan-13 19:04
Naina Dhande28-Jan-13 19:04 
AnswerRe: Socket programming Pin
Richard MacCutchan28-Jan-13 22:51
mveRichard MacCutchan28-Jan-13 22:51 
AnswerRe: Socket programming Pin
pt140129-Jan-13 10:35
pt140129-Jan-13 10:35 
QuestionDisplay an array elements in 2 columns using the console Pin
PozzaVecia28-Jan-13 9:53
PozzaVecia28-Jan-13 9:53 
AnswerRe: Display an array elements in 2 columns using the console Pin
Richard Deeming28-Jan-13 10:09
mveRichard Deeming28-Jan-13 10:09 
GeneralRe: Display an array elements in 2 columns using the console Pin
PozzaVecia28-Jan-13 11:47
PozzaVecia28-Jan-13 11:47 
QuestionDoes backgroundWorker make code slower? Pin
MichCl28-Jan-13 9:35
MichCl28-Jan-13 9:35 
AnswerRe: Does backgroundWorker make code slower? Pin
PIEBALDconsult28-Jan-13 16:02
mvePIEBALDconsult28-Jan-13 16:02 
GeneralRe: Does backgroundWorker make code slower? Pin
MichCl29-Jan-13 2:18
MichCl29-Jan-13 2:18 
GeneralRe: Does backgroundWorker make code slower? Pin
PIEBALDconsult29-Jan-13 3:16
mvePIEBALDconsult29-Jan-13 3:16 
QuestionDoes backgroundWorker make code slower? Pin
MichCl28-Jan-13 9:35
MichCl28-Jan-13 9:35 
AnswerRe: Does backgroundWorker make code slower? Pin
Pete O'Hanlon28-Jan-13 9:51
mvePete O'Hanlon28-Jan-13 9:51 
GeneralRe: Does backgroundWorker make code slower? Pin
MichCl29-Jan-13 2:19
MichCl29-Jan-13 2:19 
GeneralRe: Does backgroundWorker make code slower? Pin
MichCl29-Jan-13 4:02
MichCl29-Jan-13 4:02 
GeneralRe: Does backgroundWorker make code slower? Pin
Pete O'Hanlon29-Jan-13 4:12
mvePete O'Hanlon29-Jan-13 4:12 
QuestionGroupPrincipalExt can not be used in a query against this store Pin
JD8628-Jan-13 8:18
JD8628-Jan-13 8:18 
AnswerRe: GroupPrincipalExt can not be used in a query against this store Pin
Richard Deeming28-Jan-13 8:26
mveRichard Deeming28-Jan-13 8:26 
GeneralRe: GroupPrincipalExt can not be used in a query against this store Pin
JD8628-Jan-13 9:49
JD8628-Jan-13 9:49 
QuestionCheck if polygon is Inside another Pin
gilvani28-Jan-13 7:48
gilvani28-Jan-13 7:48 
AnswerRe: Check if polygon is Inside another Pin
pt140128-Jan-13 8:05
pt140128-Jan-13 8:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.