i am writing a Windows Forms application that allows users to manipulate data in a SQL 2008 database.
I use 3 listboxes and 1 listview on my form to hold the data from various tables in the database. The listboxes and listview are populated using a specific data-adapter that fill a specific dataset.
When I remove a row in the listview, i am searching the dataset for that particular row and I delete the row from the dataset.
After that I use the specific dataadapter again to send the update command to the SQL-server.
Unfortunately the data does not get updated but I do not get any errors.
I am using the following code:
MsgBox("Really delete PI-tag: " & lstPoints.SelectedItems(0).Text & "?")
For Each dr As DataRow In dsPoints.Tables(0).Rows
If dr("tag_name") = lstPoints.SelectedItems(0).Text Then
For Each lstItem As ListViewItem In lstPoints.SelectedItems
What am I doing wrong? I've searched the internet for hours and hours but am not able to solve it.... any help would be appreciated.