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

C#

 
Question"Reactivating" Form Pin
MarcoNedwig21-Mar-06 5:45
MarcoNedwig21-Mar-06 5:45 
QuestionSelection problem with Custom Control for CF Pin
rnvrnv21-Mar-06 5:42
rnvrnv21-Mar-06 5:42 
Questionplease help me, i cant find the way out Pin
yamacom21-Mar-06 5:30
yamacom21-Mar-06 5:30 
AnswerRe: please help me, i cant find the way out Pin
J4amieC21-Mar-06 5:43
J4amieC21-Mar-06 5:43 
AnswerRe: please help me, i cant find the way out Pin
Anil C21-Mar-06 7:08
Anil C21-Mar-06 7:08 
AnswerRe: please help me, i cant find the way out Pin
Luis Alonso Ramos21-Mar-06 17:36
Luis Alonso Ramos21-Mar-06 17:36 
GeneralRe: please help me, i cant find the way out Pin
yamacom21-Mar-06 20:21
yamacom21-Mar-06 20:21 
GeneralRe: please help me, i cant find the way out Pin
Luis Alonso Ramos22-Mar-06 6:29
Luis Alonso Ramos22-Mar-06 6:29 
yamacom wrote:
SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = {0} and PassWord = {1}",strUser,strPass);


You have to enclose the user name and password in quotes. Eg:
SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = <big><big>'</big></big>{0}<big><big>'</big></big> and PassWord = <big><big>'</big></big>{1}<big><big>'</big></big>",strUser,strPass);
BUT that is not a secure practice. You should use parameterized queries, and store the hash of the password instead of the actual password in your database. Read the article I linked to in my previous post. Better yet, I'll link to it again:

SQL Injection Attacks and Some Tips on How to Prevent Them[^]

[EDIT: next time, post just a little code, the problem you're having and your question, and any error message you might be getting. That will give your question more chances of being answered.]

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!


The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005

-- modified at 12:29 Wednesday 22nd March, 2006
QuestionFile in use? Pin
Harish Krishnan21-Mar-06 5:15
Harish Krishnan21-Mar-06 5:15 
AnswerRe: File in use? Pin
tarasn21-Mar-06 22:36
tarasn21-Mar-06 22:36 
QuestionHow to paint a rotate rectangle in form? Pin
summercoal21-Mar-06 4:33
summercoal21-Mar-06 4:33 
Questioninterop programming Pin
V.21-Mar-06 3:58
professionalV.21-Mar-06 3:58 
AnswerRe: interop programming Pin
leppie21-Mar-06 7:00
leppie21-Mar-06 7:00 
GeneralRe: interop programming Pin
V.21-Mar-06 20:15
professionalV.21-Mar-06 20:15 
AnswerRe: interop programming Pin
Judah Gabriel Himango21-Mar-06 8:23
sponsorJudah Gabriel Himango21-Mar-06 8:23 
GeneralRe: interop programming Pin
V.21-Mar-06 20:16
professionalV.21-Mar-06 20:16 
QuestionADO.NET Encrypted data Pin
gmhanna21-Mar-06 3:28
gmhanna21-Mar-06 3:28 
QuestionRegex question - how to match crc checksum Pin
daniilzol21-Mar-06 3:26
daniilzol21-Mar-06 3:26 
QuestionUpdating DataTable Pin
zaboboa21-Mar-06 3:07
zaboboa21-Mar-06 3:07 
Questionprivate chat web-application in c# using socket programming Pin
shabeer.ak21-Mar-06 2:15
shabeer.ak21-Mar-06 2:15 
AnswerRe: private chat web-application in c# using socket programming Pin
Anil C21-Mar-06 2:43
Anil C21-Mar-06 2:43 
GeneralRe: private chat web-application in c# using socket programming Pin
shabeer.ak21-Mar-06 17:00
shabeer.ak21-Mar-06 17:00 
GeneralRe: private chat web-application in c# using socket programming Pin
Anil C22-Mar-06 2:53
Anil C22-Mar-06 2:53 
Questiontapi3 Pin
hafz21-Mar-06 1:19
hafz21-Mar-06 1:19 
AnswerRe: tapi3 Pin
Michael P Butler21-Mar-06 3:28
Michael P Butler21-Mar-06 3:28 

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.