 private void button1_Click(object sender, EventArgs e)
        {

            strCon = "Data Source=RAYANEH-C5E4683\\SQLEXPRESS;Initial Catalog=master;Integrated Security=True";
            strSql = "";
            strSql = "Drop DATABASE St";
            con = new SqlConnection(strCon);
            con.Open();
            cmdClasf = new SqlCommand(strSql, con);
            cmdClasf.ExecuteNonQuery();
            strSql = "CREATE DATABASE St ON  PRIMARY ";
            strSql += "( NAME = St,";
            strSql += " FILENAME = N'D:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\S_data.mdf'";
            strSql += ", SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ";
            strSql += "( NAME = St_log, FILENAME = N'D:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\S_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) COLLATE Arabic_CI_AS_KS_WS ";
            con = new SqlConnection(strCon);
            con.Open();
            cmdClasf = new SqlCommand(strSql, con);
            cmdClasf.ExecuteNonQuery();
            con.Close(); strCon = "Data Source=RAYANEH-C5E4683\\SQLEXPRESS;Initial Catalog=St;Integrated Security=True";
            con = new SqlConnection(strCon);
            con.Open();
            strSql = "CREATE TABLE Group1(	groupCode int NOT NULL,	groupName varchar(30) NOT NULL) ON [PRIMARY]";
            cmdClasf = new SqlCommand(strSql, con);
            cmdClasf.ExecuteNonQuery();
            strSql = "CREATE TABLE selTable(stNo int PRIMARY KEY,	Code int NOT NULL)";
            cmdClasf = new SqlCommand(strSql, con);
            cmdClasf.ExecuteNonQuery();
            strSql = "INSERT INTO Group1(groupCode , groupName)  VALUES(1," + "'" + "Computer" + "'" + ")";
            cmdClasf = new SqlCommand(strSql, con);
            cmdClasf.ExecuteNonQuery();
            strSql = "INSERT INTO Group1(groupCode , groupName)  VALUES(1," + "'" + "IT" + "'" + ")";
            cmdClasf = new SqlCommand(strSql, con);
            cmdClasf.ExecuteNonQuery();
            con.Close();
            button2.Enabled = true;
            button1.Enabled = false;
            MessageBox.Show("Database St created");
            
        }
