0
    Dim lvitem As Object
    Dim iCount As Integer
    Dim iLoop As Integer
    Dim query3 = New SqlCommand
    query3.Connection = New SqlConnection("SERVER=localhost;UID=root;DATABASE=test;")
    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,SeniorRM) values('" & .SubItems(0).Text & "','" & .SubItems(1).Text & "','" & .SubItems(2).Text & "','" & .SubItems(3).Text & "','" & .SubItems(4).Text & "','" & .SubItems(5).Text & "')"
                query3.ExecuteNonQuery()
            End With
            iLoop = iLoop + 1
            LvItem = Nothing
        Loop
    End If
    MessageBox.Show("Record Saved!")

That is my code. message box show up but the record is not saved in my database. please help me

0

1 Answer 1

1

You can't use SqlClient provider. You must have to use MySql .net connector API and take a look at MySql connector examples.

Sign up to request clarification or add additional context in comments.

2 Comments

where can i find it? what should i click?
@SigridAnnOmila - Click on the links I've pasted in my post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.