Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
AnswerRe: Registries in Windows 10 Pro Pin
Richard MacCutchan3-Feb-17 22:10
mveRichard MacCutchan3-Feb-17 22:10 
QuestionCOM object that has been separated from its underlying RCW cannot be used. Pin
hpjchobbes3-Feb-17 4:48
hpjchobbes3-Feb-17 4:48 
QuestionAccess Network Share with a Microsoft HoloLens Pin
Member 127713943-Feb-17 4:01
Member 127713943-Feb-17 4:01 
QuestionRe: Access Network Share with a Microsoft HoloLens Pin
Richard MacCutchan3-Feb-17 6:42
mveRichard MacCutchan3-Feb-17 6:42 
QuestionRe: Access Network Share with a Microsoft HoloLens Pin
Member 127713943-Feb-17 7:02
Member 127713943-Feb-17 7:02 
QuestionRate my codes please? Pin
Member 111381293-Feb-17 1:06
Member 111381293-Feb-17 1:06 
AnswerRe: Rate my codes please? Pin
OriginalGriff3-Feb-17 1:26
mveOriginalGriff3-Feb-17 1:26 
SuggestionRe: Rate my codes please? Pin
Richard Deeming3-Feb-17 1:54
mveRichard Deeming3-Feb-17 1:54 
You're storing passwords in plain text. That's an immediate security failure. You should only ever store a salted hash of the password, using a unique salt per record.

Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]


You've repeated the connection string in every method. You should move that to a field on the class, or better yet, store it in the application's configuration file.

You should remove all of the fields currently on your FormWorkers class, and use local variables and return values instead. As it stands, your code is not thread-safe.

You should make all of the methods in the FormWorkers class static, and mark the class itself as static. That way, you won't need to keep creating instances of the class to call the methods.


On the plus side, you have correctly parameterised your queries, avoiding SQL Injection vulnerabilities. Thumbs Up | :thumbsup:



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionMessage Closed Pin
2-Feb-17 23:48
professionalTEProjects2-Feb-17 23:48 
AnswerRe: How to use C# ArrayList ? Pin
Midi_Mick2-Feb-17 23:52
professionalMidi_Mick2-Feb-17 23:52 
GeneralRe: How to use C# ArrayList ? Pin
TEProjects3-Feb-17 20:54
professionalTEProjects3-Feb-17 20:54 
AnswerRe: How to use C# ArrayList ? Pin
Jochen Arndt2-Feb-17 23:55
professionalJochen Arndt2-Feb-17 23:55 
GeneralRe: How to use C# ArrayList ? Pin
TEProjects3-Feb-17 20:55
professionalTEProjects3-Feb-17 20:55 
AnswerRe: How to use C# ArrayList ? PinPopular
Afzaal Ahmad Zeeshan3-Feb-17 0:00
professionalAfzaal Ahmad Zeeshan3-Feb-17 0:00 
GeneralRe: How to use C# ArrayList ? Pin
TEProjects3-Feb-17 20:57
professionalTEProjects3-Feb-17 20:57 
AnswerRe: How to use C# ArrayList ? Pin
OriginalGriff3-Feb-17 0:09
mveOriginalGriff3-Feb-17 0:09 
AnswerRe: How to use C# ArrayList ? Pin
JACOB-TANZANIA3-Feb-17 21:51
professionalJACOB-TANZANIA3-Feb-17 21:51 
Questionc# WebBrowser returns unauthorized for different domain users Pin
kubiiik2-Feb-17 4:40
kubiiik2-Feb-17 4:40 
AnswerRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen3-Feb-17 0:53
professionalEddy Vluggen3-Feb-17 0:53 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik3-Feb-17 1:05
kubiiik3-Feb-17 1:05 
QuestionRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen3-Feb-17 2:20
professionalEddy Vluggen3-Feb-17 2:20 
AnswerRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik3-Feb-17 2:28
kubiiik3-Feb-17 2:28 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen3-Feb-17 7:12
professionalEddy Vluggen3-Feb-17 7:12 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik6-Feb-17 1:21
kubiiik6-Feb-17 1:21 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen7-Feb-17 2:18
professionalEddy Vluggen7-Feb-17 2:18 

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.