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?
Loading
Riddhi ValechaPosted Apr 18, 2013, 1:57 AM
I did not get you.
What exactly your requirement is?? Please elaborate...
Javeed M ShaikhPosted Apr 17, 2013, 2:05 PM
Katie BPosted Apr 17, 2013, 1:58 PM
Javeed M ShaikhPosted Apr 17, 2013, 1:56 PM
the following will give you data only where capacity is > 25 and then you can work on this dataset.
SELECT Capacity FROM Classes WHERE ModuleID = " + lstModCode.SelectedItem + " and Capcity > 25";
Katie BPosted Apr 17, 2013, 1:48 PM
Javeed M ShaikhPosted Apr 17, 2013, 1:42 PM