예제 #1
0
        public void insert()
        {
            try
            {
                obj.Open();
                query = "insert into  billionaires (Rank_, Name, Age, Net_worth, Citizenship , Main_source_of_wealth ) values ('" +
                        @constructorObj.Rank + "','" + constructorObj.Name_ + "','" + @constructorObj.Age_ + "','" +
                        @constructorObj.Net_worth_ + "','" + @constructorObj.Citizenship_ +
                        "','" + @constructorObj.Main_source_of_wealth_ + "');";

                obj.Query(query);
            }
            catch
            {
                throw;
            }
            finally
            {
                obj.Close();
            }
        }
예제 #2
0
        public void insert()
        {
            try
            {
                obj.Open();
                query = "insert into  female_billionaires (No,Name,Age,Net_worth,Citizenship,World_rank)" +
                        " values ('" + @constructorObj.No_ + "','" + @constructorObj.Name_ + "','" + @constructorObj.Age_ + "','"
                        + @constructorObj.Net_worth_ + "','" + @constructorObj.Citizenship_ +
                        "','" + @constructorObj.World_rank_ + "');";

                obj.Query(query);
            }
            catch
            {
                throw;
            }
            finally
            {
                obj.Close();
            }
        }