Katie B

Katie B

  • NA
  • 66
  • 17.6k

Validation Advice Please.....

Apr 17 2013 1:36 PM
I've written a SQL statement that will check the class capacity (as below):
 myOleDbCommand.CommandText = "SELECT Capacity FROM Classes WHERE ModuleID = " + lstModCode.SelectedItem + " ";

But is there a way to use the data its pulled as capacity, to link it to an if statement.
E.g if (capacity > 25)
{

Messagebox.Show(Insert message here)

}

Or would the data its pulling back need to be stored somewhere?

Answers (6)