السلام عليكم ورحمة الله وبركاته
formPassword.username = txtUserName.Text
formPassword.password = txtPassword.Text
Dim cb As New OleDb.OleDbCommandBuilder(formPassword.da)
If formPassword.identity(formPassword.MaxRows, formPassword.ds, formPassword.username, formPassword.password, formPassword.itrue) = True Then
If txtNewPassword.Text = txtNewPassword2.Text And txtNewPassword.Text <> "" Then
formPassword.ds.Tables("TblUsrPsswrdPrvlg").Rows(formPassword.itrue).Item("Password") = txtNewPassword.Text.ToString
formPassword.con.Open()
formPassword.da.Update(formPassword.ds)
formPassword.con.Close()
MsgBox("Press Ok To Continue", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Done")
Me.Close()
Else
MsgBox("New Password Fields Mismatch Or Contain No Text")
End If
Else
MsgBox("Invalid User Name or Password")
End If
End Sub
هذا الكود استخدمه لتغيير كلمة السر لمستخدم التطبيق
ولكن عندما اضغط على هذا الزر تظهر رسالة خطأ:
Update unable to find TableMapping['Table'] or DataTable 'Table'.
ويعلم على السطر:
formPassword.da.Update(formPassword.ds)
جربت غيرت السطر الى:
formPassword.da.Update(formPassword.ds, "TblUsrPsswrdPrvlg")
فكانت النتيجة:
Syntax error in UPDATE statement.
