okay means i have to add the try catch block, i will and i m getting
the error of syntax error in update statement

On Dec 3, 11:14 pm, Cerebrus <[EMAIL PROTECTED]> wrote:
> Where is your try-catch-finally block ?
> What exception do you receive. "not able to change the password"
> doesn't really tell us anything about the error your receive (if at
> all you do).
>
> On Dec 3, 7:37 pm, "Mohammad Irshad Ali Ansari"
>
> <[EMAIL PROTECTED]> wrote:
> > hello,
> > i have got one problem, i m not able to update the password or u can say
> > that i m not able to change the password help please.
> > and i m a beginner so please explain me what should i have to do.
> > and thanks in advance.
> > please help me
>
> > string conString = ConnectionClass.MethodConnectionString();
> >                 OleDbConnection conn = new OleDbConnection(conString);
> >                 if (conn.State == ConnectionState.Open)
> >                 {
> >                     conn.Close();
> >                 }
> >                 //string updatePassword = @"Update LoginTable set password =
> > '" + strConfirmPassword + "'" + "where username = '" + lblUsername.Text +
> > "'";
> >                 string updatePassword = @"Update LoginTable set Password =
> > 'admin' where UserName = 'irshad'" ;
> >                 conn.Open();
> >                 OleDbCommand cmdPass = new OleDbCommand(updatePassword,
> > conn);
> >                 cmdPass.ExecuteNonQuery();
> >                 conn.Close();
> >                 MessageBox.Show("You have successfully Change ur password");
>
> > Best regards,
> > Mohammed Irshad

Reply via email to