[ASK] Cara Menyimpan value/data di listview kedalam database(mysql)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[ASK] Cara Menyimpan value/data di listview kedalam database(mysql)

chung99
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Cara Menyimpan value/data di listview kedalam database(mysql)

djiesoft
With ListView1
    Dim i As Integer
    For i = 1 To .ListItems.Count
        con.execute "INSERT INTO TABLE_TEST (KOLOM1, KOLOM2, KOLOM3) VALUES ('" + .ListItems(i).Text + "','" + .ListItems(i).ListSubItems(1).Text + "','" + .ListItems(i).ListSubItems(2).Text + "')"
    Next
End With
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Cara Menyimpan value/data di listview kedalam database(mysql)

chung99
mas djie klo memakai 2 database gmn?? misal mengambil data dari DB A kemudian di edit n menambah value na di listview trus menyimpan ke database B?? bagamana cara menyimpan listview tersebut ke database B??
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Cara Menyimpan value/data di listview kedalam database(mysql)

djiesoft
sama aja, sintaknya cuma beda koneksinya (ada 2 koneksi), contoh:
con  = variable koneksi untuk koneksi ke databseA (load data)
con2 = variable koneksi untuk koneksi ke databseB (save/insert data)

nah jadi contoh sintak diatas tinggal ganti jadi con2
Reply | Threaded
Open this post in threaded view
|

Re: [ASK] Cara Menyimpan value/data di listview kedalam database(mysql)

zalri
In reply to this post by djiesoft
Mas djie simpan banyak data dari listview gmna mas,,