I'm quite new to C# (I've programmed in C++ until now) and also don't have a whole lot of experience working with databases and SQL.
I'm currently working on a windows application that uses a database and have been relying on Visual Studio 2005's built-in controls to handle it for me (i.e. binding data to textboxes etc.). Now I need to be able to grab a value out of one of the tables (I know exactly which value) to use it in some calculations, but I don't know how to put the value into an int variable. This is what I want to happen:
int ta500stock = this.rentalManagerDataSet.StockList.Select("February WHERE (Product = 'TA500')");
*Note: StockList is the table and February is the column that I want the value from.
Now, the compiler tells me that I "Cannot implicitly convert type 'System.Data.DataRow' to 'int'" which makes sense, but I don't know how to set it up so that I can grab the value and store it as an int.
Any suggestions, advice, or links would be much appreciated.