Dim sql As String = "update DLYZ set 登陸密碼='" + TextBox_xgmm_xdmm.Text.Trim() + "'where 工作證號 ='" + Form1.TextBox1.Text.Trim() + "'"
創(chuàng)新互聯(lián)建站服務(wù)項目包括澤州網(wǎng)站建設(shè)、澤州網(wǎng)站制作、澤州網(wǎng)頁制作以及澤州網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,澤州網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到澤州省份的部分城市,未來相信會繼續(xù)擴大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
where前面需要加上空格
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
以下這里有錯誤:
Dim mysqlstr As String = "SELECT * FROM 登錄表 WHERE users='" username " 'AND password='" userpassword " '"
修改為:
Dim mysqlstr As String = "SELECT * FROM 登錄表 WHERE users='" username "' AND password='" userpassword "'"