I need syntax help with the following code logic:
I have a block of code that gets an email address from a database. Email addresses must be bound to strEmailAddress, a comma-separated string
My code is:
SqlConnection conn = new SqlConnection(strConn);
string sqlEmailAddress = "usp_Get_Email_Address";
SqlCommand cmdEmailAddr = new SqlCommand(sqlEmailAddress, conn);
cmdEmailAddr.CommandType = CommandType.StoredProcedure;
con.Open();
SqlDataReader sqlDREmailAddr = cmdEmailAddr.ExecuteReader();
How can I scroll through records and save the results in strEmailAddress, separated by comma?
source
share