strsql = "insert into amenity_tbl values (?,?,?,?,?)"
            strs = "delete from amenity_tbl where amenityid = ?"
            Using cn As New OdbcConnection(connM), _
            cmd As New OdbcCommand(strsql, cn), _
            conn As New OdbcConnection(connA), _
            com As New OdbcCommand(strs, conn)

                cmd.Parameters.Add("?", OdbcType.VarChar, 20)
                cmd.Parameters.Add("?", OdbcType.VarChar, 200)
                cmd.Parameters.Add("?", OdbcType.Double, 20, 2)
                cmd.Parameters.Add("?", OdbcType.VarChar, 100)
                cmd.Parameters.Add("?", OdbcType.VarChar, 200)

                com.Parameters.Add("?", OdbcType.VarChar, 20)
                For Each ls As ListViewItem In lvCurrent.CheckedItems
                    For j As Integer = cmd.Parameters.Count To 0
                        For i As Integer = lvCurrent.SelectedItems.Count To 0

                            cmd.Parameters(j).Value = lvCurrent.Items.Add(i)

                            com.Parameters(0).Value = ls.SubItems(0).Text
                            'com.Parameters(1).Value = ls.SubItems(1).Text
                            'com.Parameters(2).Value = Double.Parse(ls.SubItems(2).Text)
                            'com.Parameters(3).Value = ls.SubItems(3).Text
                            'com.Parameters(4).Value = ls.SubItems(4).Text
                Next ls

                    Amenity("select * from amenity_tbl")
                    Amenity_archive("select * from amenity_tbl")
            End Using

Help please!

Read this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.