I have a pretty basic connection to a database, My question is nested in the While Statement
C#.NET
MSSQL 2005
Data.SqlClient
String strCon = "Server=...";
SqlConnection conn = new SqlConnection(strCon);
SqlDataReader rdr = null;
conn.Open();
SqlCommand cmd = new SqlCommand("select intID, email from cventcontacts WHERE URL is null",conn);
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
// I want to get information from a 3rd party API based on email from rdr[1] then UPDATE the record in my database
// I think i can figure out the api side of it, but how do i reconnect to the database and update the record?
}
rdr.Close();
conn.Close();
emails.Text = sb.ToString(); Thanks in advance