Try
connect()
sql = "Select * from F_Tire where Position=2 "
cmd = New SqlClient.SqlCommand(sql, cn)
DR = cmd.ExecuteReader
While DR.Read
IN1.Text = DR.Item("ID")
IN2.Text = DR.Item("IDCAR")
IN3.Text = DR.Item("Dateuse")
IN4.Text = DR.Item("Position")
IN5.Text = DR.Item("Serial")
IN6.Text = DR.Item("TypeTire")
IN7.Text = DR.Item("Mile")
IN8.Text = DR.Item("Depth")
End While
If IN4.Text = "" Then
MsgBox("ไม่มีข้อมูลยางนี้ในระบบ")
End If
cn.Close()
Catch ex As Exception
End Try