Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Connect Local Database Server in Button Click With C#.net ? Pin
Mycroft Holmes30-Sep-09 23:18
professionalMycroft Holmes30-Sep-09 23:18 
Questionread the changed value from "Workbook_SheetCalculate(object sh)" function for Excel Pin
NarVish30-Sep-09 21:43
NarVish30-Sep-09 21:43 
Questiondatagridview Pin
Anjani Poornima30-Sep-09 21:43
Anjani Poornima30-Sep-09 21:43 
QuestionJava to C# Pin
satsumatable30-Sep-09 21:41
satsumatable30-Sep-09 21:41 
AnswerRe: Java to C# Pin
SeMartens30-Sep-09 22:05
SeMartens30-Sep-09 22:05 
Questionmulti-user winforms application Pin
An Enigma30-Sep-09 21:36
An Enigma30-Sep-09 21:36 
AnswerRe: multi-user winforms application Pin
SeMartens30-Sep-09 22:09
SeMartens30-Sep-09 22:09 
GeneralRe: multi-user winforms application Pin
Greg Chelstowski30-Sep-09 22:37
Greg Chelstowski30-Sep-09 22:37 
SeMartens wrote:

Second: The way you validate username and password is not really the safest one.


Safest? It's flawed badly!
Of course you can only log in as the last user in the db, because that's when your while loop ends.
Even when and if your username and password is correct for some other user, and you set the count variable to 1, the next time the loop.. .erm... loops it will change it back to 2. Unless it's the last record.

To the author:
But yeah, the way you do it is really ugly, though. Imagine you had 500k users. Would you put all the records in the memory then, and iterate through them?
Ever heard of the "WHERE" clause for T-Sql? ;>

var question = (_2b || !(_2b));

GeneralRe: multi-user winforms application Pin
An Enigma30-Sep-09 22:43
An Enigma30-Sep-09 22:43 
GeneralRe: multi-user winforms application Pin
Greg Chelstowski30-Sep-09 22:49
Greg Chelstowski30-Sep-09 22:49 
GeneralRe: multi-user winforms application Pin
An Enigma30-Sep-09 22:52
An Enigma30-Sep-09 22:52 
GeneralRe: multi-user winforms application Pin
J4amieC30-Sep-09 23:22
J4amieC30-Sep-09 23:22 
GeneralRe: multi-user winforms application Pin
Mycroft Holmes30-Sep-09 22:56
professionalMycroft Holmes30-Sep-09 22:56 
GeneralRe: multi-user winforms application Pin
An Enigma30-Sep-09 23:02
An Enigma30-Sep-09 23:02 
GeneralRe: multi-user winforms application Pin
Mycroft Holmes30-Sep-09 23:25
professionalMycroft Holmes30-Sep-09 23:25 
Questiononshutdown() problem Pin
Ajithevn30-Sep-09 20:54
Ajithevn30-Sep-09 20:54 
AnswerRe: onshutdown() problem Pin
N a v a n e e t h30-Sep-09 21:11
N a v a n e e t h30-Sep-09 21:11 
GeneralRe: onshutdown() problem Pin
Ajithevn30-Sep-09 21:25
Ajithevn30-Sep-09 21:25 
QuestionHow to view a Column Name in listbox by selecting the Column in DataGridView Pin
mumair78630-Sep-09 20:51
mumair78630-Sep-09 20:51 
AnswerRe: How to view a Column Name in listbox by selecting the Column in DataGridView Pin
Mycroft Holmes30-Sep-09 23:09
professionalMycroft Holmes30-Sep-09 23:09 
GeneralRe: How to view a Column Name in listbox by selecting the Column in DataGridView Pin
mumair7861-Oct-09 0:38
mumair7861-Oct-09 0:38 
GeneralRe: How to view a Column Name in listbox by selecting the Column in DataGridView Pin
Henry Minute1-Oct-09 1:12
Henry Minute1-Oct-09 1:12 
GeneralRe: How to view a Column Name in listbox by selecting the Column in DataGridView Pin
mumair7861-Oct-09 2:21
mumair7861-Oct-09 2:21 
QuestionFunction waiting Pin
discreetz30-Sep-09 20:40
discreetz30-Sep-09 20:40 
AnswerRe: Function waiting Pin
Paramhans Dubey30-Sep-09 20:48
professionalParamhans Dubey30-Sep-09 20:48 

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.