Click here to Skip to main content
16,009,238 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: query Pin
sashidhar30-Sep-09 21:50
sashidhar30-Sep-09 21:50 
GeneralRe: query Pin
Abhijit Jana30-Sep-09 23:08
professionalAbhijit Jana30-Sep-09 23:08 
JokeRe: query Pin
Vasudevan Deepak Kumar1-Oct-09 2:44
Vasudevan Deepak Kumar1-Oct-09 2:44 
AnswerRe: query Pin
sashidhar30-Sep-09 21:49
sashidhar30-Sep-09 21:49 
GeneralRe: query Pin
mylogics30-Sep-09 21:57
professionalmylogics30-Sep-09 21:57 
GeneralRe: query Pin
Abhishek Sur30-Sep-09 22:05
professionalAbhishek Sur30-Sep-09 22:05 
GeneralRe: query Pin
sashidhar30-Sep-09 22:50
sashidhar30-Sep-09 22:50 
AnswerRe: query Pin
Abhishek Sur30-Sep-09 22:04
professionalAbhishek Sur30-Sep-09 22:04 
The query looks good, the only possible problem that might took place is when Parameters like txtnewpassword, txtconfirmpassword,txtusername, txtpassword comes with some weird values.

Say I write txtnewpassword.Text = "0'--"

This is what we call SQL injection. So use like this.

string str = "UPDATE memberlogin SET Password=@newpass, Confirmpassword=@confirm WHERE MemberNo=@member AND Password=@password";
OleDbCommand cmd = new OleDbCommand(str, conn);
SqlParameter confirm = new SqlParameter("@confirm", SqlDbType.NVarchar, 50);
confirm.value = txtnewpassword.Text; // This will remove sql injection
cmd.Parameters.Add(confirm);
.....
...
...


.. Do this for all other parameters.

Hope you got this more clear now. Rose | [Rose]

Abhishek Sur

My Latest Articles
Create CLR objects in SQL Server 2005
C# Uncommon Keywords
Read/Write Excel using OleDB

Don't forget to click "Good Answer" if you like to.

GeneralRe: query Pin
mylogics30-Sep-09 22:59
professionalmylogics30-Sep-09 22:59 
GeneralRe: query Pin
Abhijit Jana30-Sep-09 23:07
professionalAbhijit Jana30-Sep-09 23:07 
GeneralRe: query Pin
mylogics30-Sep-09 23:11
professionalmylogics30-Sep-09 23:11 
GeneralRe: query Pin
Greg Chelstowski30-Sep-09 23:17
Greg Chelstowski30-Sep-09 23:17 
GeneralRe: query Pin
sashidhar30-Sep-09 23:24
sashidhar30-Sep-09 23:24 
QuestionControl Windows Service From ASP.net Web Site. Pin
VikashGohil30-Sep-09 21:16
VikashGohil30-Sep-09 21:16 
AnswerRe: Control Windows Service From ASP.net Web Site. Pin
Abhijit Jana30-Sep-09 21:43
professionalAbhijit Jana30-Sep-09 21:43 
AnswerRe: Control Windows Service From ASP.net Web Site. Pin
N a v a n e e t h30-Sep-09 21:49
N a v a n e e t h30-Sep-09 21:49 
AnswerRe: Control Windows Service From ASP.net Web Site. Pin
Abhishek Sur30-Sep-09 21:52
professionalAbhishek Sur30-Sep-09 21:52 
AnswerRe: Control Windows Service From ASP.net Web Site. Pin
VikashGohil1-Oct-09 0:35
VikashGohil1-Oct-09 0:35 
GeneralRe: Control Windows Service From ASP.net Web Site. Pin
Vasudevan Deepak Kumar1-Oct-09 2:48
Vasudevan Deepak Kumar1-Oct-09 2:48 
QuestionThousand Seperator in GridView Pin
yogeshu30-Sep-09 21:01
yogeshu30-Sep-09 21:01 
AnswerRe: Thousand Seperator in GridView Pin
N a v a n e e t h30-Sep-09 21:07
N a v a n e e t h30-Sep-09 21:07 
GeneralRe: Thousand Seperator in GridView Pin
yogeshu30-Sep-09 22:59
yogeshu30-Sep-09 22:59 
AnswerRe: Thousand Seperator in GridView Pin
Vasudevan Deepak Kumar1-Oct-09 2:47
Vasudevan Deepak Kumar1-Oct-09 2:47 
QuestionRetrieving the value in the embed html Pin
jknascrimz30-Sep-09 20:38
jknascrimz30-Sep-09 20:38 
AnswerRe: Retrieving the value in the embed html Pin
Kannan Ar30-Sep-09 20:55
professionalKannan Ar30-Sep-09 20:55 

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.