Hi i am making a desktop windows application, students and courses and grades.
i use VS2010 ultimate, windows 8.
the database i used is from within VS2010 (.mdf) i added it as new item to the project (service based DB).
all works fine for select statements and showing data in gridviews and whatnot...
until i tried to update records through a button. after updating it should reflect and show the new values in the datagridview ....
update works ok on the winform (provided i have to click update twice dont know why!) and that is while form is open.
when i close the form and re-open it the records shown as the previous ones and old values were not updated.
my code for the button:
Dim myGridTable As New DataTable()
' i assumed it needs this---not working---> PssDBDataSet.EnforceConstraints = False
gridAdapter.SelectCommand = New SqlCommand("update enroll set MID = '" & lblRezMid.Text & "' where cid ='" & cidCB.Text & "' ", conn)
' i assumed it needs this---not working---> gridAdapter.Fill(PssDBDataSet, "Enroll")
' i assumed it needs this---not working---> gridAdapter.Update(PssDBDataSet, "Enroll")
Catch ex As Exception
If gridAdapter IsNot Nothing Then
there are strings and numbers but like i mentioned, during form operation it shows good interactivity, but changes wont reflect on the real DB when i open it from visual studio (database name pssDB.mdf)