sql數(shù)據(jù)庫怎么用 修改密碼的代碼怎么寫?
修改密碼的代碼怎么寫?String oldpass=“登錄的舊密碼”if(textbox1。Text==oldpass){string newpass=textbox2。Text string SQL
修改密碼的代碼怎么寫?
String oldpass=“登錄的舊密碼”if(textbox1。Text==oldpass){string newpass=textbox2。Text string SQL=“update user login table set password field=”“newpass”“其中user name field=login user“SqlConnection conn=New SqlConnection(“connect database string”)連接打開()SqlCommand cmd=新的SqlCommand(sql,conn)cmd.ExecuteNonQuery命令() 連接關(guān)閉()//提示修改成功}否則{//提示,舊密碼不正確}