Dim xcmd As OleDbCommand = New OleDbCommand("SELECT * FROM Type WHERE TypeID=" & txtTypeID.Text & "", xconn)
xrec = xcmd.ExecuteReader()
If xrec.Read Then
txtTypeID.Text = xrec.Item("TypeID")
txtTypeName.Text = xrec.Item("TypeName")
Else
txtTypeID.Text = " "
txtTypeName.Text = ""
MsgBox("ไม่พบข้อมูล")
End If
Dim strSQL As String = "SELECT * FROM Type WHERE TypeID=" & txtTypeID.Text & ""
Dim xcmd As OleDbCommand = New OleDbCommand(strSQL, xconn)
xrec = xcmd.ExecuteReader()
If xrec.Read Then
txtTypeID.Text = xrec.Item("TypeID")
txtTypeName.Text = xrec.Item("TypeName")
Else
txtTypeID.Text = " "
txtTypeName.Text = ""
MsgBox("ไม่พบข้อมูล")
End If