int result=0;
SqlCommand sc=new sqlCommand(connstr,com)
 string mySelectQuery = select sum(field) from table1
    SqlConnection myConnection = new SqlConnection(myConnString);
    SqlCommand myCommand = new SqlCommand(mySelectQuery,myConnection);
    myConnection.Open();
    SqlDataReader myReader;
    myReader = myCommand.ExecuteReader();
    // Always call Read before accessing data.
    while (myReader.Read()) {
       result=myReader.GetInt32(0);
    }
    // always call Close when done reading.
    myReader.Close();label1.text=result.tostring();