Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
GeneralRe: If statement Pin
dusty_dex10-Mar-13 6:05
dusty_dex10-Mar-13 6:05 
AnswerRe: If statement Pin
ali_heidari_10-Mar-13 0:10
ali_heidari_10-Mar-13 0:10 
GeneralRe: If statement Pin
jschell10-Mar-13 6:19
jschell10-Mar-13 6:19 
GeneralRe: If statement Pin
ali_heidari_10-Mar-13 6:23
ali_heidari_10-Mar-13 6:23 
QuestionAbout Regex Pin
Sottyoru9-Mar-13 4:50
Sottyoru9-Mar-13 4:50 
AnswerRe: About Regex Pin
PIEBALDconsult9-Mar-13 5:09
mvePIEBALDconsult9-Mar-13 5:09 
GeneralRe: About Regex Pin
Sottyoru9-Mar-13 7:08
Sottyoru9-Mar-13 7:08 
AnswerRe: About Regex Pin
Ravi Bhavnani9-Mar-13 13:05
professionalRavi Bhavnani9-Mar-13 13:05 
QuestionSuggssion Please Pin
M VSubrahmanyam9-Mar-13 3:42
M VSubrahmanyam9-Mar-13 3:42 
AnswerRe: Suggssion Please Pin
OriginalGriff9-Mar-13 3:59
mveOriginalGriff9-Mar-13 3:59 
GeneralRe: Suggssion Please Pin
NotPolitcallyCorrect9-Mar-13 9:09
NotPolitcallyCorrect9-Mar-13 9:09 
GeneralRe: Suggssion Please Pin
David C# Hobbyist.9-Mar-13 9:12
professionalDavid C# Hobbyist.9-Mar-13 9:12 
GeneralRe: Suggssion Please Pin
PIEBALDconsult9-Mar-13 4:42
mvePIEBALDconsult9-Mar-13 4:42 
AnswerRe: Suggssion Please Pin
Abhinav S9-Mar-13 22:38
Abhinav S9-Mar-13 22:38 
Questionmanage clients Pin
karimi55559-Mar-13 3:07
karimi55559-Mar-13 3:07 
AnswerRe: manage clients Pin
Dave Kreskowiak9-Mar-13 3:22
mveDave Kreskowiak9-Mar-13 3:22 
GeneralRe: manage clients Pin
karimi55559-Mar-13 5:46
karimi55559-Mar-13 5:46 
GeneralRe: manage clients Pin
Dave Kreskowiak9-Mar-13 7:58
mveDave Kreskowiak9-Mar-13 7:58 
GeneralRe: manage clients Pin
karimi55559-Mar-13 8:48
karimi55559-Mar-13 8:48 
QuestionMake richTextBox non-editable in Silverlight Pin
vijendra589-Mar-13 0:29
vijendra589-Mar-13 0:29 
AnswerRe: Make richTextBox non-editable in Silverlight Pin
Eddy Vluggen9-Mar-13 1:32
professionalEddy Vluggen9-Mar-13 1:32 
QuestionTreeView-based custom control Pin
alex__b8-Mar-13 18:52
professionalalex__b8-Mar-13 18:52 
AnswerRe: TreeView-based custom control Pin
Richard MacCutchan8-Mar-13 22:01
mveRichard MacCutchan8-Mar-13 22:01 
GeneralRe: TreeView-based custom control Pin
alex__b9-Mar-13 5:18
professionalalex__b9-Mar-13 5:18 
Questionhow update password for a user in access using c# Pin
User34908-Mar-13 14:06
User34908-Mar-13 14:06 
I have 3 textboxes (txtoldpassword,txtnewpassword,txtconfirmpassword)
and i want to take the data that dives a user and if a user password exists in access then i can update the user password.

i try this but it doesn't work.

private void btnSave_Click(object sender, EventArgs e)
{


if (txtOldPassword.Text.Length == 0 || txtNewPassword.Text.Length == 0 || txtConfPassword.Text.Length == 0)
{

MessageBox.Show("Please Fill all the fields.");
}
else if (txtNewPassword.Text != txtConfPassword.Text )
{

MessageBox.Show(" Please insert again your new password.");

}


else
{
OleDbConnection connect = new OleDbConnection();

connect.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\user\Desktop\Laiki_Trapeza_Questionnaires.accdb;Persist Security Info=False;";


connect.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = connect;
command.CommandText = (@"UPDATE Users_Table SET Password= '" + txtNewPassword.Text.ToString() + "' WHERE (Password='"+txtOldPassword.Text + "')");
MessageBox.Show(" Succesfull update password!");


connect.Close();

}
}

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.