I have a dataset that is tied to a Access database. If i run the select command it returns the rows from the table. If i run an insert statement, it appears to run. If I then run the select again the old and the new rows return.
When i close the app and reopen it the "new" row is gone.
here is my update code block:
-The answer to your problem may not be the answer to your question.
When i close the app and reopen it the "new" row is gone.
here is my update code block:
Code:
Dim xsdNames As New SampleDataSetTableAdapters.PNR_NAMESTableAdapter
Dim dsNames As New SampleDataSet.PNR_NAMESDataTable()
Dim intCounter As New Integer()
xsdNames.Fill(dsNames)
Try
xsdNames.Connection.Open()
[COLOR=green]'lvNames is a ListView[/color]
For intCounter = 0 To lvNames.Items.Count() - 1
Debug.Write("Ins->" & xsdNames.Connection.State() & " ")
xsdNames.Insert("a", "1", _
lvNames.Items(intCounter).SubItems(1).Text, _
lvNames.Items(intCounter).SubItems(2).Text, _
lvNames.Items(intCounter).SubItems(3).Text, _
lvNames.Items(intCounter).Text, _
lvNames.Items(intCounter).SubItems(4).Text)
Debug.Write(xsdNames.Connection.State() & "<-Ins ")
Next
[COLOR=green]'xsdNames.Connection.Close()[/color]
Catch ex As Exception
MsgBox(ex.ToString())
End Try
-The answer to your problem may not be the answer to your question.