Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

listview checkbox

lembayunglembayung Member Posts: 1
[code]For i = 1 To ListView3.ListItems.Count

If ListView3.ListItems(i).Tag = "" And ListView3.ListItems(i).Checked = True Then

sql = "insert into studentcourse ( peid,pengkod, bioid ) " & _
"values ( " & _
"'" & ListView3.ListItems(i).SubItems(1) & "', " & _
"'" & holdPENG & "')"

db.Execute sql

ElseIf ListView3.ListItems(i).Tag <> "" And ListView3.ListItems(i).Checked = True Then

sql = "update studentcourse set " & _
"peid = '" & ListView3.ListItems(i).SubItems(1) & "', " & _
"pengkod= '" & holdPENG & "' " & _
"where peid = " & ListView3.ListItems(i).Tag

db.Execute sql

ElseIf ListView3.ListItems(i).Tag <> "" And ListView3.ListItems(i).Checked = False Then

sql = "delete from studentcourse where peid = " & ListView3.ListItems(i).Tag

db.Execute sql

End If[/code]


this is my code...ive compiled and theres no error..but all the data is not saved to my database..why is it so?
Sign In or Register to comment.