Hello..
Your code is fine and its working too.
the problem is that you want to update only one data in the table but you write the code to update all the data when data-reader gets the data, so if you want to update only one data then set the code for that .
While lrd.Read()
If lrd("TNumStatus") = Lstat Then
here your code getting these condition true for 2 times thats why its updation the 2 row.
If you think this is not the Problem then use a flag and debug the code and check.
Dim lrd As SqlDataReader = cmd11.ExecuteReader()
Dim Lstat As String = "Ready"
While lrd.Read()
Dim i as int32 =1
If lrd("TNumStatus") = Lstat Then
if i==1 then
Dim NID As String = lrd.GetValue(0)
Dim NVal As String = lrd.GetValue(1)
Dim NStat As String = lrd.GetValue(2)
Dim ho As String = "Hold"
Dim cmd111 As New SqlCommand
Dim con111 As New SqlConnection
con111.ConnectionString = SqlDataSource2.ConnectionString
con111.Open()
cmd111.Connection = con111
cmd111.CommandText = "UPDATE TNum SET TNumStatus = '" & ho & "' WHERE TNumID = '" & NID & "'"
cmd111.ExecuteNonQuery()
con111.Close()
Exit While
lrd.Close()
i=i+1
End if
Else
End If
End While