Im currently making a type of gym membership software using vb.net as the front end and access database to store the records.
Ive been working on this for the past few weeks, ive been battling errors and complications all the time, and im getting to the point where the deadline is looming as its a college project.
Im not expecting answers or anyone to to do the work, i would appropriate if anyone could give me hints or point me in the right directions.
Ive had success at updating one form with data but as its a membership system i need to be able too update two forms on the same vb page.
One for there details such as name, age etc.
The other for there membership details
Here is the code for my update button
Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnupdate.Click
Dim cb As New OleDb.OleDbCommandBuilder(da)
inc = 1
sql = "Select * FROM members"
da = New OleDb.OleDbDataAdapter(sql, con)
ds.Tables("members").Rows(inc).Item(1) = txtFirstname.Text
ds.Tables("members").Rows(inc).Item(2) = txtsurname.Text
ds.Tables("members").Rows(inc).Item(3) = txtDateofbirth.Text
ds.Tables("members").Rows(inc).Item(4) = txtAddress.Text
ds.Tables("members").Rows(inc).Item(5) = txtPostcode.Text
ds.Tables("members").Rows(inc).Item(6) = txtTelephone.Text
ds.Tables("members").Rows(inc).Item(7) = txtGender.Text
ds.Tables("members").Rows(inc).Item(8) = txtemail
[B] da.Update(ds, "members")[/B]
Update requires a valid UpdateCommand when passed DataRow collection with modified rows.
ds.Clear()
da.Fill(ds, "members")
sql = "Select * FROM payments"
da = New OleDb.OleDbDataAdapter(sql, con)
ds.Tables("payments").Rows(inc).Item(1) = txtpayment.Text
da.Update(ds, "payments")
ds.Clear()
da.Fill(ds, "payments")
End Sub
Could anyone give me any suggestions please
Thanks