网站建设资讯

NEWS

网站建设资讯

vb.net修改密码 vba设置密码

vb.net 如何修改access数据库文件的密码

If Trim(ypsw.Text) = "" Then

创新互联秉承实现全网价值营销的理念,以专业定制企业官网,成都做网站、成都网站制作,微信平台小程序开发,网页设计制作,手机网站开发,成都营销网站建设帮助传统企业实现“互联网+”转型升级专业定制企业官网,公司注重人才、技术和管理,汇聚了一批优秀的互联网技术人才,对客户都以感恩的心态奉献自己的专业和所长。

MsgBox("原密码不能为空!", MsgBoxStyle.Critical)

ElseIf Trim(xpsw.Text) = "" Then

MsgBox("新密码不能为空!", MsgBoxStyle.Critical)

ElseIf Trim(qpsw.Text) Trim(xpsw.Text) Then

MsgBox("确认密码与新密码不一致!", MsgBoxStyle.Critical)

Else

Dim mycon As New OleDbConnection

mycon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" Application.StartupPath "\data\Datas.mdb"

mycon.Open()

Dim mycmd As New OleDbCommand

mycmd.CommandText = "select * from 管理员 where 用户名='admin' and 密码='" ypsw.Text " '"

mycmd.Connection = mycon

Dim myada As New OleDbDataAdapter

myada.SelectCommand = mycmd

Dim myda As New DataSet

myada.Fill(myda, "yh")

If myda.Tables("yh").Rows.Count 1 Then

MsgBox("您输入的原密码不正确,请重新输入!", MsgBoxStyle.Critical)

ypsw.Focus()

Else

mycmd.CommandText = "update 管理员 set 密码='" Trim(ypsw.Text) " '"

mycmd.ExecuteNonQuery()

MsgBox("密码修改成功!", MsgBoxStyle.Information)

End If

End If

VB.NET修改密码代码,只要写更改按钮即可,谢谢。。

汗等等 我最近也在做 我贴代码吧,这些什么原始密码和新密码不是要用户输入嘛,我连接的是SQLstring userID = textBox1.Text; //用户名

string passWorld = textBox2.Text; //密码

string newpwd = textBox3.Text; //新密码

Login login1=new Login(); //登陆窗口实例

if (mima() == 1)

{

SqlConnection mySqlconnection = new SqlConnection(login1.connectionString);

SqlCommand myCommand = new SqlCommand("update Table1 set 密码='" + newpwd.Trim() + "'where 账号='" + userID.Trim() + "'and 密码='" + passWorld.Trim() + "'", mySqlconnection);

mySqlconnection.Open();

int command = myCommand.ExecuteNonQuery();

if (command = 1)

{

if (MessageBox.Show("密码修改成功,现在马上去登陆?", "确定", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)

{

mySqlconnection.Close();

this.Close();

login1.Show();

}

}

else

{

mySqlconnection.Close();

MessageBox.Show("用户不存在或密码错误");

}

}

else

{

MessageBox.Show("新密码不能与旧密码相同!!");

textBox2.Text = "";

textBox3.Text = "";

textBox2.Focus();

}

vb.net中修改用户密码

以下这里有错误:

Dim mysqlstr As String = "SELECT * FROM 登录表 WHERE users='" username " 'AND password='" userpassword " '"

修改为:

Dim mysqlstr As String = "SELECT * FROM 登录表 WHERE users='" username "' AND password='" userpassword "'"

vb.net 按钮 修改密码 代码

Dim sql As String = "update DLYZ set 登陆密码='" + TextBox_xgmm_xdmm.Text.Trim() + "'where 工作证号 ='" + Form1.TextBox1.Text.Trim() + "'"

where前面需要加上空格


分享名称:vb.net修改密码 vba设置密码
文章转载:http://cdweb.net/article/dojceoi.html