C
C a r l o s A n t o n i o
Sorry for the x-posting. It's just I'm not sure which group this post is
related to.
Well, I have an Access 2007 database (also tried with Access 2003 with no
success) and I am creating an application for my programming class (which is
due this week) using VB2008. I am using Typed Datasets. The thing is that
I cannot do a simple thing as updating a record. I do not get error
messages either. I will post the code, if anyone could help me, I will be
very grateful.
Thanks a lot for your help.
Private Sub update_new_user_password()
Try
'Connection String in My.Settings:
'Provider=Microsoft.ACE.OLEDB.12.0;Data
Source="|DataDirectory|\DAL\Databases\v2 communications.accdb";Persist
Security Info=True
Dim ta As New
v2_communicationsDataSetTableAdapters.V2DataLoginTableAdapter
Dim dt As v2_communicationsDataSet.V2DataLoginDataTable
Dim row As v2_communicationsDataSet.V2DataLoginRow
dt = ta.GetData
row = dt.FindByUserNameID(str_username.Trim)
With row
.BeginEdit()
Debug.Print(.UserNameID & ", " & .Password)
.Password = texnewpassword.Text
Debug.Print(.UserNameID & ", " & .Password)
.EndEdit()
End With
ta.Update(dt)
Catch ex As Exception
MessageBox.Show(ex.Message, Application.ProductName,
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End Sub
related to.
Well, I have an Access 2007 database (also tried with Access 2003 with no
success) and I am creating an application for my programming class (which is
due this week) using VB2008. I am using Typed Datasets. The thing is that
I cannot do a simple thing as updating a record. I do not get error
messages either. I will post the code, if anyone could help me, I will be
very grateful.
Thanks a lot for your help.
Private Sub update_new_user_password()
Try
'Connection String in My.Settings:
'Provider=Microsoft.ACE.OLEDB.12.0;Data
Source="|DataDirectory|\DAL\Databases\v2 communications.accdb";Persist
Security Info=True
Dim ta As New
v2_communicationsDataSetTableAdapters.V2DataLoginTableAdapter
Dim dt As v2_communicationsDataSet.V2DataLoginDataTable
Dim row As v2_communicationsDataSet.V2DataLoginRow
dt = ta.GetData
row = dt.FindByUserNameID(str_username.Trim)
With row
.BeginEdit()
Debug.Print(.UserNameID & ", " & .Password)
.Password = texnewpassword.Text
Debug.Print(.UserNameID & ", " & .Password)
.EndEdit()
End With
ta.Update(dt)
Catch ex As Exception
MessageBox.Show(ex.Message, Application.ProductName,
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try
End Sub