Dim i As Integer = 1 Dim statechck As String = "occupy" Dim state As String
While i <= 56 Dim Str As String = "Select Status from Status where SeatNo = '" + i + "'" Dim reader As OleDbDataReader = cmd.ExecuteReader() While reader.Read() state = reader.GetValue(0).ToString() If state = statechck Then button[i].image= My.Resources.ResourceManager.GetObject("greenseat"))'gives error End If i = i + 1 End While
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)