Click here to Skip to main content
15,887,303 members
Home / Discussions / C#
   

C#

 
QuestionListboxes etc. on top of video Pin
lvq68418-Oct-09 7:29
lvq68418-Oct-09 7:29 
AnswerRe: Listboxes etc. on top of video Pin
Not Active18-Oct-09 9:26
mentorNot Active18-Oct-09 9:26 
GeneralRe: Listboxes etc. on top of video Pin
lvq68418-Oct-09 22:04
lvq68418-Oct-09 22:04 
QuestionTrying to send email... Pin
JollyMansArt18-Oct-09 6:50
JollyMansArt18-Oct-09 6:50 
AnswerRe: Trying to send email... Pin
Manas Bhardwaj18-Oct-09 9:19
professionalManas Bhardwaj18-Oct-09 9:19 
AnswerRe: Trying to send email... Pin
Not Active18-Oct-09 9:25
mentorNot Active18-Oct-09 9:25 
Questioncheck the text box string dynamically with database field Pin
Mangesh Tomar18-Oct-09 6:22
Mangesh Tomar18-Oct-09 6:22 
AnswerRe: check the text box string dynamically with database field Pin
Luc Pattyn18-Oct-09 11:11
sitebuilderLuc Pattyn18-Oct-09 11:11 
Hi,

IMO that is not the right way to do login checks; you should not read the entire table and iterate it.

this is what I would do:
1. have a table with fields username, and password
2. form the user login attempt, take the username and the password;
3. now do a "SELECT * WHERE username='"+username+"' AND password='"+password+"'"
(better yet use parameterized SQL)
4. you now either get 0 or 1 row returned, that tells you the user/password combination is unknown or known

Improvements:
- do not store passwords as text, use some encryption or hashing, and store or search the result thereof.
- better yet, apply a salt[^].

Smile | :)

Luc Pattyn

I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages

Local announcement (Antwerp region): Lange Wapper? 59.24% waren verstandig genoeg om NEEN te stemmen; bye bye viaduct.


QuestionPass Excel.Application from Excel 2007 Custom Task Pane to Hosted PowerShell Pin
Uros Calakovic18-Oct-09 4:07
Uros Calakovic18-Oct-09 4:07 
QuestionSubReport in Win Form (RDLC) Pin
Abdul Rahman Hamidy18-Oct-09 3:20
Abdul Rahman Hamidy18-Oct-09 3:20 
AnswerRe: SubReport in Win Form (RDLC) Pin
Christopher Stratmann17-Apr-10 18:22
Christopher Stratmann17-Apr-10 18:22 
QuestionOpen RTF file in MS Word & WordPad Pin
Jassim Rahma18-Oct-09 3:18
Jassim Rahma18-Oct-09 3:18 
AnswerRe: Open RTF file in MS Word & WordPad Pin
0x3c018-Oct-09 3:34
0x3c018-Oct-09 3:34 
AnswerRe: Open RTF file in MS Word & WordPad Pin
DaveyM6918-Oct-09 3:35
professionalDaveyM6918-Oct-09 3:35 
AnswerRe: Open RTF file in MS Word & WordPad Pin
Luc Pattyn18-Oct-09 11:14
sitebuilderLuc Pattyn18-Oct-09 11:14 
QuestionGenerate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 3:02
AhmedMasum18-Oct-09 3:02 
AnswerRe: Generate sql select statement from another select statement Pin
Not Active18-Oct-09 3:38
mentorNot Active18-Oct-09 3:38 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 15:33
AhmedMasum18-Oct-09 15:33 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 16:14
sitebuilderLuc Pattyn18-Oct-09 16:14 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 17:09
AhmedMasum18-Oct-09 17:09 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn18-Oct-09 18:04
sitebuilderLuc Pattyn18-Oct-09 18:04 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum18-Oct-09 18:41
AhmedMasum18-Oct-09 18:41 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn19-Oct-09 2:08
sitebuilderLuc Pattyn19-Oct-09 2:08 
GeneralRe: Generate sql select statement from another select statement Pin
AhmedMasum19-Oct-09 4:28
AhmedMasum19-Oct-09 4:28 
GeneralRe: Generate sql select statement from another select statement Pin
Luc Pattyn19-Oct-09 4:38
sitebuilderLuc Pattyn19-Oct-09 4:38 

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.