I have the following code. When I add a new row, it adds it to the dataset in memory but never updates the database on the hard drive. What am I doing wrong?
VB Code:
myCon = New SqlConnection("Data Source=.\SQLEXPRESS..........) myDA = New SqlDataAdapter("SELECT * FROM Rescue", myCon) myDA.TableMappings.Add("Table", "Rescue") myDS = New DataSet myDA.Fill(myDS) Dim myRow As DataRow = myDS.Tables("Rescue").NewRow myRow.Item("CallNum") = Me.TxtCallNum.Text myRow.Item("TimeCall") = Me.TxtTimeCall.Text myDS.Tables("Rescue").Rows.Add(myRow) myDA.Update(myDS)




Reply With Quote