Three Tier Architecture

1. DATA LAYER 

--------------------------------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Configuration;


namespace ClassLibrary.DataAcess
{
    public class Data
    {
       
            #region "Constant(s)"
            // protected static string connectionString = ConfigurationSettings.AppSettings["rajtestConnectionString"].ToString();
            protected static string connectionString = "Data Source=happy1;Initial Catalog=Employee13;Integrated Security=True";
            #endregion

            #region "Constructor(s)"
            public Data()
            {
             
            }
            ~Data()
            {
            }
            #endregion

            #region "Attributes/Properties"
            protected SqlConnection conn = null;
            protected SqlTransaction txn = null;
            public SqlTransaction Transaction
            {
                get
                {
                    return txn;
                }
                set
                {
                    txn = value;
                }
            }
            #endregion

            #region "Public Methods"
            public void CloseConnection()
            {
                try
                {
                    if (conn != null)
                    {
                        conn.Close(); //Closes connection
                        conn = null;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            public void BeginTransaction()
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }

                    txn = conn.BeginTransaction();

                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            public void CommitTransaction()
            {
                try
                {
                    if (txn.Connection.State == ConnectionState.Closed)
                        txn.Connection.Open();
                    txn.Commit();
                }
                catch (System.Exception err)
                {
                    throw err;
                }
                finally
                {
                    this.CloseConnection();
                }
            }

            public void RollbackTransaction()
            {
                try
                {
                    if (txn != null)
                    {
                        if (txn.Connection.State == ConnectionState.Closed)
                            txn.Connection.Open();
                        txn.Rollback();
                        txn = null;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            public DataTable GetSchema(string tableName)
            {
                try
                {
                    using (DataTable dt = new DataTable())
                    {
                        if (null == conn)
                        {
                            conn = new SqlConnection(connectionString);
                            conn.Open();
                        }
                        using (SqlCommand cmd = conn.CreateCommand())
                        {
                            cmd.CommandText = "select * from " + tableName + " where 1 = 0";  // yet to be created.
                            cmd.CommandType = CommandType.Text;
                            if (txn != null)
                                cmd.Transaction = this.txn;
                            using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
                            {
                                DataSet v_ds = new DataSet();
                                adapter.Fill(v_ds, tableName);
                                return v_ds.Tables[0];
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close();
                            conn = null;
                        }
                    }
                }
            }

            /// <summary>
            /// 
            /// </summary>
            /// <param name="v_ds"></param>
            /// <param name="name"></param>
            /// <param name="cmdText"></param>
            /// <param name="cmdParms"></param>
            public void FillDataSet(DataSet v_ds, string name, string cmdText, SqlParameter[] cmdParms)
            {
                try
                {
                    if (null == v_ds)
                        v_ds = new DataSet();
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }
                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = cmdText;
                        cmd.CommandType = CommandType.StoredProcedure;
                        if (null != cmdParms)
                        {
                            foreach (SqlParameter parm in cmdParms)
                                cmd.Parameters.Add(parm);
                        }
                        using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
                        {
                            //cmd.ExecuteNonQuery();
                            adapter.Fill(v_ds, name);
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (conn != null)
                    {
                        conn.Close();
                        conn = null;
                    }
                }
            }

            /// <summary>
            ///  return DataTable 
            /// </summary>
            /// <param name="name"></param>
            /// <param name="cmdText"></param>
            /// <param name="cmdParms"></param>
            public DataTable GetDataByReader(string name, string cmdText, SqlParameter[] cmdParms)
            {
                try
                {
                    using (DataTable dt = new DataTable())
                    {
                        if (null == conn)
                        {
                            conn = new SqlConnection(connectionString);
                            conn.Open();
                            //if (log.IsInfoEnabled)
                            //    log.Info("[" + System.DateTime.Now.ToString() + "] DataAccess: Connect:: Database Connection successfully. ");
                        }

                        using (SqlCommand cmd = conn.CreateCommand())
                        {
                            cmd.CommandText = cmdText;
                            cmd.CommandType = CommandType.StoredProcedure;
                            cmd.Transaction = this.txn;
                            if (null != cmdParms)
                            {
                                foreach (SqlParameter parm in cmdParms)
                                    cmd.Parameters.Add(parm);
                            }
                            using (SqlDataReader dr = cmd.ExecuteReader())
                            {
                                dt.Load(dr);
                                return dt;
                            }
                        }
                        //using (SqlCommand cmd = conn.CreateCommand())
                        //{
                        //    cmd.CommandText = cmdText;
                        //    cmd.CommandType = CommandType.StoredProcedure;
                        //    if (null != cmdParms)
                        //    {
                        //        foreach (SqlParameter parm in cmdParms)
                        //            cmd.Parameters.Add(parm);
                        //    }
                        //    using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
                        //    {
                        //        DataSet v_ds = new DataSet();
                        //        //cmd.ExecuteNonQuery();
                        //        adapter.Fill(v_ds, name);
                        //        return v_ds.Tables[0];
                        //    }
                        //}
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close();
                            conn = null;
                        }
                    }
                }
            }

            /// <summary>
            /// <param name="cmdText"></param>
            /// <param name="v_dt"></param>
            /// </summary>
            public int DataTableUpdate(string cmdText, DataTable v_dt)
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }
                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = cmdText;
                        cmd.CommandType = CommandType.Text;
                        cmd.Transaction = this.txn;
                        using (SqlDataAdapter adapter = new SqlDataAdapter(cmd))
                        {
                            using (SqlCommandBuilder builder = new SqlCommandBuilder(adapter))
                            {
                                return adapter.Update(v_dt);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                    return -1;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            /// <summary>      
            /// <param name="cmdText"></param>
            /// <param name="cmdType"></param>
            /// <param name="cmdParms"></param>
            /// <returns></returns> 
            /// </summary>
            public int ExecuteNonQuery(string cmdText, SqlParameter[] cmdParms)
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }

                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = cmdText;
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Transaction = this.txn;
                        if (null != cmdParms)
                        {
                            foreach (SqlParameter parm in cmdParms)
                                cmd.Parameters.Add(parm);
                        }
                        int val = cmd.ExecuteNonQuery();

                        return val;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            /// <summary>
            /// <param name="cmdText"></param>
            /// <param name="cmdType"></param>
            /// <param name="cmdParms"></param>
            /// <returns></returns>
            /// </summary>
            public object ExecuteScalar(string cmdText, SqlParameter[] cmdParms)
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }

                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = cmdText;
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Transaction = this.txn;
                        if (null != cmdParms)
                        {
                            foreach (SqlParameter parm in cmdParms)
                                cmd.Parameters.Add(parm);
                        }
                        object val = cmd.ExecuteScalar();
                        return val;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            /// <summary>
            /// This Method is used to Update Single Field for Provided Table
            /// </summary>
            /// <param name="TableName">Name of Table for which record is to be Updated</param>
            /// <param name="PrimaryKeyField">Name of Field of Primary / Unique Key for Specified Table</param>
            /// <param name="PrimaryKeyValue">Value of Primary Key Field</param>
            /// <param name="FieldToUpdate">Name of field for which Value is updated</param>
            /// <param name="NewValueForFieldToUpdate">New Value of FieldToUpdate</param>
            public int ExecuteSingleFieldUpdate(string tableName, string primaryKeyField, string primaryKeyValue, string fieldToUpdate, string newValue)
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }

                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = "OMSingleFieldUpdate"; //Yet to be Created.
                        cmd.Parameters.AddWithValue("?_TableName", tableName);
                        cmd.Parameters.AddWithValue("?_PrimaryKeyField", primaryKeyField);
                        cmd.Parameters.AddWithValue("?_PrimaryKeyValue", primaryKeyValue);
                        cmd.Parameters.AddWithValue("?_FieldToUpdate", fieldToUpdate);
                        cmd.Parameters.AddWithValue("?_NewValueForFieldToUpdate", newValue);

                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Transaction = this.txn;
                        int val = cmd.ExecuteNonQuery();
                        return val;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            public int ExecuteSingleFieldUpdateByQuery(string tableName, string primaryKeyField, string primaryKeyValue, string fieldToUpdate, string newValue)
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }
                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        string Query = "UPDATE " + tableName + " SET " + fieldToUpdate + " = '" + newValue + "' WHERE " + primaryKeyField + " = '" + primaryKeyValue + "'";
                        cmd.CommandText = Query;
                        cmd.CommandType = CommandType.Text;
                        cmd.Transaction = this.txn;
                        int val = cmd.ExecuteNonQuery();
                        return val;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close(); //Closes connection
                            conn = null;
                        }
                    }
                }
            }

            public DataTable GetSingleRecord(string tableName, string primaryKeyField, string primaryKeyValue)
            {
                try
                {
                    using (DataTable dt = new DataTable())
                    {
                        if (null == conn)
                        {
                            conn = new SqlConnection(connectionString);
                            conn.Open();
                        }

                        using (SqlCommand cmd = conn.CreateCommand())
                        {
                            cmd.CommandText = "select * from " + tableName + " where " + primaryKeyField + " = " + primaryKeyValue;
                            cmd.CommandType = CommandType.Text;
                            if (txn != null)
                                cmd.Transaction = this.txn;
                            using (SqlDataReader dr = cmd.ExecuteReader())
                            {
                                dt.Load(dr);
                                return dt;
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close();
                            conn = null;
                            //if (log.IsInfoEnabled)
                            //    log.Info("[" + System.DateTime.Now.ToString() + "] DataAccess: CloseConnection:: Database Connection Closed. ");
                        }
                    }
                }
            }

            public int GetMaxID(string tableName, string primaryKeyField)
            {
                try
                {
                    if (null == conn)
                    {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
                    }
                    using (SqlCommand cmd = conn.CreateCommand())
                    {
                        cmd.CommandText = "select max(" + primaryKeyField + ") from " + tableName;
                        cmd.CommandType = CommandType.Text;
                        if (txn != null)
                            cmd.Transaction = this.txn;
                        using (SqlDataReader dr = cmd.ExecuteReader())
                        {
                            int maxID = 0;
                            if (dr.Read())
                            {
                                if (dr[0] == System.DBNull.Value)
                                    maxID = 0;
                                else
                                    maxID = Convert.ToInt32(dr.GetValue(0));
                            }
                            return maxID;
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close();
                            conn = null;
                            //if (log.IsInfoEnabled)
                            //    log.Info("[" + System.DateTime.Now.ToString() + "] DataAccess: CloseConnection:: Database Connection Closed. ");
                        }
                    }
                }
            }

            /// <summary>
            /// This method is returns the records of any table without filtering.
            /// </summary>
            /// <param name="tableName">Provide the table name to return the records.</param>
            /// <returns></returns>
            public DataTable GetAllRecords(string tableName)
            {
                try
                {
                    using (DataTable dt = new DataTable())
                    {
                        if (null == conn)
                        {
                            conn = new SqlConnection(connectionString);
                            conn.Open();
                        }
                        using (SqlCommand cmd = conn.CreateCommand())
                        {
                            cmd.CommandText = "select * from " + tableName;
                            cmd.CommandType = CommandType.Text;
                            if (txn != null)
                                cmd.Transaction = this.txn;
                            using (SqlDataReader dr = cmd.ExecuteReader())
                            {
                                dt.Load(dr);
                                return dt;
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close();
                            conn = null;
                        }
                    }
                }
            }

            public DataTable GetDataByQuery(string Query)
            {
                try
                {
                    using (DataTable dt = new DataTable())
                    {
                        if (null == conn)
                        {
                            conn = new SqlConnection(connectionString);
                            conn.Open();
                        }
                        using (SqlCommand cmd = conn.CreateCommand())
                        {
                            cmd.CommandText = Query;
                            cmd.CommandType = CommandType.Text;
                            cmd.Transaction = this.txn;

                            using (SqlDataReader dr = cmd.ExecuteReader())
                            {
                                dt.Load(dr);
                                return dt;
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (txn == null)
                    {
                        if (conn != null)
                        {
                            conn.Close();
                            conn = null;
                        }
                    }
                }
            }
            #endregion
        
    }
}
--------------------------------------------------------------------------------------------------------------------------------

2.OBJECT LAYER 

--------------------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassLibrary.Business_Logic;
using ClassLibrary.DataAcess;
using ClassLibrary.Object;


namespace ClassLibrary.Object
{
    public class Objects
    {
        public Objects()
    {

    }
        private string TxtName;
        private string TxtAddress;
        private string TxtAge;
        private string TxtGender = null;
        private string TxtContactNumber;
        private string TxtMailID;
        private string Emp_ID;
        

        

        public string EMP_ID
        {
            get
            {
                return Emp_ID;
            }
            set
            {
                Emp_ID = value;
            }
        }

        public string TxtNamee
        {
            get
            {
                return TxtName;
            }
            set
            {
                TxtName = value;
            }
        }

        public string TxtAddresss
        {
            get
            {
                return TxtAddress;
            }
            set
            {
                TxtAddress = value;
            }
        }

        public string TxtAGE
        {
            get
            {
                return TxtAge;
            }
            set
            {
                TxtAge = value;
            }
        }

        public string TxtGENDER
        {
            get
            {
                return TxtGender;
            }
            set
            {
                TxtGender = value;
            }
        }

        public string TxtCONTACT
        {
            get
            {
                return TxtContactNumber;
            }
            set
            {
                TxtContactNumber = value;
            }
        }

        public string TxtMAILID
        {
            get
            {
                return TxtMailID;
            }
            set
            {
                TxtMailID = value;
            }
        }

    }

}

-------------------------------------------------------------------------------------------------------

3.BussnessLayer LOGIC


-----------------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using ClassLibrary.Business_Logic;
using ClassLibrary.DataAcess;
using ClassLibrary.Object;

namespace ClassLibrary.Business_Logic
{
   
        public class Buisness
        {
            public Buisness()
            {
 
            }

            Data objdata = new Data();

            public DataSet getdata()
            {
                DataSet ds = new DataSet();
                objdata.FillDataSet(ds, "getdata", "SP_DhavalEmpSelect", null);
                return ds;
            }

            public void UpdateEmployeee(Objects obj)
            {
                try
                {
                    SqlParameter[] pr = 
                    {
                                      new SqlParameter("@EmployeeName",DbType.String),
                                      new SqlParameter("@EmployeeAddress",DbType.String),
                                      new SqlParameter("@EmployeeAge",DbType.String),
                                      new SqlParameter("@EmployeeGender",DbType.String),
                                      new SqlParameter("@EmployeeContact",DbType.String),
                                     
                                      new SqlParameter("@EmployeeMail",DbType.String),
                                      new SqlParameter("@Emp_ID",DbType.String),
                                      new SqlParameter("@mod","Update")
                    };

                    pr[0].Value = obj.TxtNamee;
                    pr[1].Value = obj.TxtAddresss;
                    pr[2].Value = obj.TxtAGE;
                    pr[3].Value = obj.TxtGENDER;
                    pr[4].Value = obj.TxtCONTACT;
                    pr[5].Value = obj.TxtMAILID;
                    pr[6].Value = obj.EMP_ID;



                    objdata.ExecuteNonQuery("SP_DhavalForAllinOne", pr);
                }


                catch (Exception ex)
                {

                    throw ex;
                }
            }

            public void InsertEmployeee(Objects obj)
            {
                try
                {
                    SqlParameter[] pr= 
                    {
                                      new SqlParameter("@EmployeeName",DbType.String),
                                      new SqlParameter("@EmployeeAddress",DbType.String),
                                      new SqlParameter("@EmployeeAge",DbType.String),
                                      new SqlParameter("@EmployeeGender",DbType.String),
                                      new SqlParameter("@EmployeeContact",DbType.String),
                                      new SqlParameter("@EmployeeMail",DbType.String),
                                      new SqlParameter("@mod","Insert")
                    };

                                      pr[0].Value = obj.TxtNamee;
                                      pr[1].Value = obj.TxtAddresss;
                                      pr[2].Value = obj.TxtAGE;
                                      pr[3].Value = obj.TxtGENDER;
                                      pr[4].Value = obj.TxtCONTACT;
                                      pr[5].Value = obj.TxtMAILID;


                                      objdata.ExecuteNonQuery("SP_DhavalForAllinOne", pr);
                }

                
                catch (Exception ex)
                {
                    
                    throw ex;
                }
            }


            public DataSet GridBind2ByID(Objects obj)
            {
                try
                {
                    DataSet ds = new DataSet();

                    SqlParameter[] pr = 
                    {
                                      new SqlParameter("@EmployeeGender",DbType.String),
                                     // new SqlParameter("@mod","SelectByID")
                                      
                    };

                    pr[0].Value = obj.TxtGENDER;



                    objdata.FillDataSet(ds, "getdata", "SP_DhavalEmpSelectByGender", pr);

                    return ds;
                }


                catch (Exception ex)
                {

                    throw ex;
                }
            }


            public DataSet SelectByID(Objects obj)
            {
                try
                {
                    DataSet ds = new DataSet();

                    SqlParameter[] pr = 
                    {
                                      new SqlParameter("@Emp_ID",DbType.Int32),
                                     // new SqlParameter("@mod","SelectByID")
                                      
                    };

                    pr[0].Value = obj.EMP_ID;



                    objdata.FillDataSet(ds, "getdata", "SP_DhavalEmpSelectByID", pr);

                    return ds;
                }


                catch (Exception ex)
                {

                    throw ex;
                }
            }

            public void DeleteEmployee(Objects obj)
            {
                try
                {
                   // DataSet ds = new DataSet();

                    SqlParameter[] pr = 
                    {
                                      new SqlParameter("@Emp_ID",DbType.Int32)
                                      //new SqlParameter("@mod","Delete")
                                      
                    };

                    pr[0].Value = obj.EMP_ID;
             //       pr[0].Value = obj.



                    objdata.ExecuteNonQuery("SP_DhavalEmpDelete", pr);

                   // return ds;
                }


                catch (Exception ex)
                {

                    throw ex;
                }
            }

        }
   
}

Top 10 Virus Of All Time





1. Surreptitious Sircam

Sircam appeared in July 2001 on PCs running Windows 95, 98, and Me. The worm appeared in e-mail in-boxes with an attachment; the body of the message was in Spanish or English. Typical greetings included "Hi! How are you?" and "Hola como estas?" If you launched the attachment, Sircam installed itself on the infected computer, then grabbed random documents and sent them out to e-mail addresses it captured from your address book. It also occasionally deleted files and filled the infected computer's hard drive with gibberish. Visit Symantec's Security Response for instructions on how to remove Sircam.

2. Red Raider

Code Red burned brightly in the summer of 2001, infecting hundreds of thousands of computers--mainly on corporate networks. Code Red slithered through a hole in Internet Information Server (IIS) software, which is widely used to power Internet servers, then scanned the Internet for vulnerable systems to infect and continue the process. The worm used contaminated PCs as weapons in denial of service attacks--flooding a Web site with a barrage of information requests. The original target was the official White House Web site, but government officials changed the site's IP address to thwart the attack.
The worm exploited a weakness in the IIS software (which has since been fixed with a patch from Microsoft) that allowed an intruder to run arbitrary code on a victimized computer. Multiple variants of this worm now exist. Visit Symantec's Security Response for instructions on how to protect your system from Code Red.

3. Bad Benjamin

Benjamin--a new breed of worm--was let loose in May 2002, and it affected users of the popular file-sharing program Kazaa. The crafty worm posed as popular music and movie files. Kazaa users thought they were downloading a media file to their machines, but they got the imposter instead. It then set up a Kazaa share folder and stuffed it with copies of itself posing as popular music and movie files, which other Kazaa users would download. It congested the system's network connection and would ultimately fill up a hard drive. Visit Symantec's Security Response for instructions on how to remove Benjamin.

4. Numbing Nimda

Nimda (also known as the Concept Virus) appeared in September 2001, attacking tens of thousands of servers and hundreds of thousands of PCs. The worm modified Web documents and executable files, then created numerous copies of itself. The worm spread as an embedded attachment in an HTML e-mail message that would execute as soon as the recipient opened the message (unlike the typical attached virus that requires manual launching of the attachment). It also moved via server-to-server Web traffic, infected shared hard drives on networks, and downloaded itself to users browsing Web pages hosted on infected servers. Nimda soon inspired a crowd of imitators that followed the same pattern. Visit Symantec's Security Response for the Nimda removal tool.

5. Tennis Anyone?

The Anna Kournikova (or VBS.SST@mm) worm, appearing in February 2001, didn't cause data loss, although in the process of boosting the profile of its namesake, the Russian tennis player, it did cause embarrassment and disruption for many personal and business users. The worm showed up in Microsoft Outlook users' e-mail in-boxes with an attachment (supposedly a picture of Kournikova). The attachment proved hard to resist. The result? Clicking the bogus attachment sent copies of the worm via e-mail to all addresses found in the victim's Outlook address book. Kournikova also brought about a number of copycat variants. Visit Symantec's Security Response for instructions on how to remove Kournikova.
Most worm creators have never been identified, but a 21-year-old Dutchman, Jan de Wit, admitted to unleashing this worm. The admitted virus writer is appealing a 150-hour community service sentence handed down in September 2001 by a judge in the Netherlands.

6. (Expletive Deleted) Explorer

The Explorer.zip worm appeared in the summer of 1999, following in the footsteps of Melissa. The worm deleted Word, Excel, and PowerPoint files and randomly altered other types of files. Like Melissa (see below), Explorer traveled via e-mails that appeared to be from someone the recipient knew. The message included a file that, if activated, showed a fake error message to the user. Unlike Melissa, this virus did not use Outlook to gather e-mail addresses. Instead, it watched the in-box of the infected computer and then sent automatic replies to senders, using the same e-mail subject as the original message.

7. Maniacal Magistr

Magistr is one of the most complex viruses to hit the Internet. Its victims, users of Outlook Express, were hooked by an infected e-mail attachment. The virus, discovered in mid-March 2001, sent garbled messages to everyone in the infected user's e-mail address book. Attached were files pulled at random from the infected PC's hard drive plus an executable file with the Magistr code. This virus was not as widespread as many others, but it was very destructive. Magistr overwrites hard drives and erases CMOS and the flashable BIOS, preventing systems from booting. It also contained antidebugging features, making it hard to detect and destroy. Visit Symantec's Security Response for instructions on how to remove Magistr.

8. Malevolent Melissa

The Melissa virus swamped corporate networks with a tidal wave of e-mail messages in March 1999. Through Microsoft Outlook, when a user opened an e-mail message containing an infected Word attachment, the virus was sent to the first 50 names in the user's address book. The e-mail fooled many recipients because it bore the name of someone the recipient knew and referred to a document they had allegedly requested.
So much e-mail traffic was generated so quickly that companies like Intel and Microsoft had to turn off their e-mail servers. The Melissa virus was the first virus capable of hopping from one machine to another on its own. And it's another good example of a virus with multiple variants. Visit Symantec's Security Response for instructions on how to remove Melissa.

9. Klez the Conquerer

The Klez worm, which blends different virus traits, was first detected in October 2001. Klez distributes itself like a virus, but sometimes acts like a worm, other times like a Trojan horse. Klez isn't as destructive as other worms, but it is widespread, hard to exterminate--and still active. In fact, so far, no other virus has stayed in circulation quite like Klez. It spreads via open networks and e-mail--regardless of the e-mail program you use. Klez sometimes masquerades as a worm-removal tool. It may corrupt files and disable antivirus products. It pilfers data from a victim's e-mail address book, mixing and matching new senders and recipients for a new round of infection. Visit Symantec's Security Response for instructions on how to remove Klez.

10. Love Hurts

LoveLetter is the worm everyone learned to hate in spring 2000. The infection affected millions of computers and caused more damage than any other computer virus to date. Users were infected via e-mail, through Internet chat systems, and through other shared file systems. The worm sent copies of itself via Microsoft Outlook's address book entries. The mail included an executable file attachment with the e-mail subject line, "ILOVEYOU." The worm had the ability to overwrite several types of files, including .gif and .jpg files. It modified the Internet Explorer start page and changed Registry keys. It also moved other files and hid MP3 files on affected systems. Visit Symantec's Security Response for instructions on how to remove LoveLetter.