The problem is it works updating the records but all records will gonna update... i want to update the selected records only.. I use Listview~!

example column table:

                      Dual CPU

when I edit the Intel(R) into VGAgraphics, the Pentium(R) and Dual CPU will also change into VGAgraphics when i click update..

Please help me to solve this~~!

Here's my code:

Dim ValueToUpdate1 As String

ValueToUpdate1 = TextBox2.Text.ToString()

sqlcmd = New SqlCommand("UPDATE table1 SET [Processor]=@Processor", sqlconn)

sqlcmd.Parameters.AddWithValue("@Processor", ValueToUpdate1)
    MsgbBox("Updated Successfully")

If you want to update a single record you need to add a where clause to your sql statement.

sqlcmd = New SqlCommand("UPDATE table1 SET [Processor]=@Processor WHERE id=@id", sqlconn)

You just need to get the unique identifier for the row you wish to update in your database table.

Hope this helps!

I try this codes, its running but its not changing the value that i type

Dim id As Integer
id = Integer.MaxValue
sqlcmd = New SqlCommand("UPDATE table1 SET [Processor]=@Processor WHERE id=@id", sqlconn)
sqlcmd.Parameters.AddWithValue("@id", id)

help me to improve this~!