C#, SQL database Evaluate data
Posted on 2013-10-25
Good morning experts, I have a current project I need to evaluate some data from a SQL database, I'll use C# to connect to it, but I'm not sure how I would evaluate the data as I'm retrieving it....
Just as a simple for instance:
Suppose I have a database with 3 columns, Firstname, lastname, title - in C# if I wanted to go through each record and if "Title" == "Manager" then increment my count of managers +1 (mgrCount++).... (This is just a quick example, but if I can evaluate this even, then i would be able to figure out what I was doing)
Thank you again.
I would assume I need to do something to my datareader in my while loop as I'm looping though the information, correct?
if(rdr..ToString() == "Manager"
Would something like this work?