Dim iCount As Integer
Dim iLoop As Integer
Dim query3 As New MySqlCommand
Dim lvitem
ConnectDatabase()
conn.Open()
iCount = lvLogs.Items.Count
If Not lvLogs.Items.Count = 0 Then
Do Until iLoop = lvLogs.Items.Count
lvitem = lvLogs.Items.Item(iLoop)
With lvitem
query3.CommandText = "insert into wer(CustomerName, SalesGroup, CustomerType, TypeOfIndustry, RM, SenioRM) values " _
& "('" & .SubItems(0).Text & "','" & .SubItems(1).Text & "','" & .SubItems(2).Text & "','" & .SubItems(3).Text & "','" & .SubItems(4).Text & "','" & .SubItems(5) & "')"
query3.ExecuteNonQuery()
End With
iLoop = iLoop + 1
lvitem = Nothing
MessageBox.Show("Record added!")
Loop
End If
thats my code
i've attached my project
Attached File(s)
-
browse.zip (162.59K)
Number of downloads: 17

New Topic/Question
This topic is locked



MultiQuote




|