Need a quick example of a stored procedure in C#, normally programme in VB so getting slightly annoyed with this at the moment as nothing i do seems to work.
The code i have so far is below, i just need the SQL reader bit in c# and grab the column memberCounter and store it in a variable, an full example would be great.
sqlConnection conn = new SqlConnection();
SqlCommand cmd = new SqlCommand();
conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["connstring"].ConnectionString;
string SQLStr = "bart_CheckEmail";
cmd.CommandText = SQLStr;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandTimeout = 60;
cmd.Parameters.Add("@email", SqlDbType.NVarChar).Value = fldEmailSignUp.Text;
cmd.Connection = conn;
*THIS IS WHERE I WANT TO READ THE COLUMN memberCounter and store it in a varable*