Save and Edit data from Listview to MS Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newbiefyke
    New Member
    • Mar 2014
    • 2

    #1

    Save and Edit data from Listview to MS Access

    Code:
    Public Class Form3
    
        Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            lv1.Columns.Add("name", CInt(lv1.Width / 3))
            lv1.Columns.Add("age", CInt(lv1.Width / 3))
            lv1.Columns.Add("color", CInt(lv1.Width / 3))
        End Sub
    
        Private Sub add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles add.Click
            Call AppendItemtolistview(TextBox1.Text, TextBox2.Text, TextBox3.Text)
        End Sub
    
        Private Sub AppendItemtolistview(ByVal name As String, ByVal age As String, ByVal color As String)
            Dim newitem As New ListViewItem(name)
            newitem.SubItems.Add(age)
            newitem.SubItems.Add(color)
    
            lv1.Items.Insert(0, newitem)
        End Sub
    
    End Class
    This is my code to add data in List view.

    Q. how can I save it to MS access?
    Can I edit the data in any row?
    Attached Files
Working...