Hi All,
This is my first post ,
I can not understand why I can't save the current record of a dataset.
Let me explain ...
I have a small application with a management admin ...
I have a single admin password, the user can change it and so I created a classical form ( old password, new password, repeat new password).
When I click the confirm button:
- filtering the data set with old-password
- when the old password match --> I take the current record
- Update the current record
i have no error but on the db the record doesn't update.
here the code for the button ...
Thank you in advance and sorry for my bad english
GianCasa ^ _ ^
Ascolta
Trascrizione fonetica
This is my first post ,
I can not understand why I can't save the current record of a dataset.
Let me explain ...
I have a small application with a management admin ...
I have a single admin password, the user can change it and so I created a classical form ( old password, new password, repeat new password).
When I click the confirm button:
- filtering the data set with old-password
- when the old password match --> I take the current record
- Update the current record
i have no error but on the db the record doesn't update.
here the code for the button ...
VB.NET:
'Validating input
Me.ChangePassAdminDataSource.Filter = " password ='" & UtilPuzz.normString(Trim(TxtOldPassword.Text)) & "'"
If Me.ChangePassadminDataSource.Count = 1 Then
Dim o As GCSDataSet.passAdminRow
o = Me.ChangePassAdminDataSource.Current.row
o.BeginEdit()
o.password = TxtNewPassword.Text
o.EndEdit()
Me.ChangePassAdminDataSource.EndEdit()
Try
Me.PassAdminTableAdapter.Update(Me.GCSDataSet.passAdmin)
Me.GCSDataSet.AcceptChanges()
MsgBox("Password mod ok .", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "Pass..")
Catch ex As OleDb.OleDbException
MsgBox("Error")
End Try
Else
MsgBox("Wrong pass", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "Pass...")
End If
Thank you in advance and sorry for my bad english
GianCasa ^ _ ^
Ascolta
Trascrizione fonetica