PDA

View Full Version : سوال: پیغام خطای اوراکلی در فرم تعویض کلمه عبور



manit44
یک شنبه 03 آبان 1394, 19:40 عصر
سلام بر دوستان

من فرم تعویض کلمه عبور رو بوسیله ado.net نوشتم ولی هنگام تعویض کلمه عبور با خطای اوراکلی ORA-01008: not all variables bound روبرو میشم و هر کاری میکنم درست نمیشه تو اینترنت هم سرچ زدم ولی چیز به در بخوری پیدا نکردم ..... لطفا کمکم کنید چکار باید بکنم؟

این هم کدمه:

string query = "UPDATE TBL_USER T SET T.PASSWORD = :PASSWORD WHERE T.PK_USER = :PK_USER AND T.USER_NAME = :USER_NAME";
OracleCommand cmd = new OracleCommand(query, con);
//cmd.Parameters.Add(":PK_USER", OracleType.Number);
cmd.Parameters.Add(":PASSWORD", OracleType.VarChar, 20).Value = txt_new_password.Text;
cmd.Parameters.Add(":USER_NAME", OracleType.VarChar, 100).Value = txt_user_name.Text;
if (txt_current_password.Text != "")
{
if (txt_new_password.Text != "" && txt_retype_password_1.Text != "")
{
if (txt_new_password.Text == txt_retype_password_1.Text)
{
if (PersianMessageBox.Show("تغییرات با موفقیت ذخیره شد", true, "تغییر رمز عبور", PersianMessageBox.Buttons.تائيد, PersianMessageBox.DefaultButton.اولي, PersianMessageBox.Icons.اطلاعات) == PersianMessageBoxDLL.PersianMessageBox.Result.تا ئيد)
{
txt_new_password.Text = "";
txt_current_password.Text = "";
txt_retype_password_1.Text = "";
this.Hide();
frm_login login = new frm_login();
login.ShowDialog();
}
}
else
{
PersianMessageBox.Show("رمزها یکی نیستند", true, "خطا", PersianMessageBox.Buttons.تائيد, PersianMessageBox.DefaultButton.اولي, PersianMessageBox.Icons.خطا);
txt_new_password.Text = "";
txt_current_password.Text = "";
txt_retype_password_1.Text = "";
txt_current_password.Focus();
}
}

}
else
{
PersianMessageBox.Show("رمز فعلی را وارد کنید", true, "خطا", PersianMessageBox.Buttons.تائيد, PersianMessageBox.DefaultButton.اولي, PersianMessageBox.Icons.خطا);
txt_new_password.Text = "";
txt_current_password.Text = "";
txt_retype_password_1.Text = "";
txt_current_password.Focus();
}
con.Open();
cmd.ExecuteNonQuery();
con.Close();




با تشکر از دوستان

manit44
یک شنبه 03 آبان 1394, 21:24 عصر
دوستان تلاش نکنید خودم پیداش کردم.