• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OracleDataAdapter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OracleDataAdapter的典型用法代码示例。如果您正苦于以下问题:C# OracleDataAdapter类的具体用法?C# OracleDataAdapter怎么用?C# OracleDataAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OracleDataAdapter类属于命名空间,在下文中一共展示了OracleDataAdapter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PesquisarButton_Click

        private void PesquisarButton_Click(object sender, EventArgs e)
        {
            StringBuilder sbQuery = new StringBuilder();
            sbQuery.Append(query);

            try
            {
                if (!FiltroTextBox.Text.Equals("") && !FiltroComboBox.SelectedItem.ToString().Equals("FORNECEDOR"))
                {
                    sbQuery.Append(" WHERE " + FiltroComboBox.SelectedItem.ToString() + " = " + FiltroTextBox.Text);
                }

                if (!FiltroTextBox.Text.Equals("") && FiltroComboBox.SelectedItem.ToString().Equals("FORNECEDOR"))
                {
                    sbQuery.Append(" WHERE " + FiltroComboBox.SelectedItem.ToString() + " like '%" + FiltroTextBox.Text + "%'");
                }

                OracleDataAdapter adpBuscarDados = new OracleDataAdapter(sbQuery.ToString(), conn);

                DataTable resultado = new DataTable();

                adpBuscarDados.Fill(resultado);

                GridPesquisa.DataSource = resultado;

                sbQuery.Clear();

            }
            catch (OracleException)
            {

            }
        }
开发者ID:iigorbarcelos,项目名称:controlepromotores,代码行数:33,代码来源:PesquisaForm.cs


示例2: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string ab =  Session["B_c_package"].ToString();
                string cmdQuery = "Select * from Decuration_Package where dec_pack_service = '"+ ab +"' ";
                OracleDataAdapter a = new OracleDataAdapter(cmdQuery, ConnectionString);
                OracleCommandBuilder builder = new OracleCommandBuilder(a);
                DataSet ds = new DataSet();
                a.Fill(ds, "Decuration_Package");
                foreach (DataRow r in ds.Tables["Decuration_Package"].Rows)
                {
                    ListItem i = new ListItem();
                    i.Text = r["DEC_PACK_NAME"].ToString();
                    i.Value = r["DEC_PACK_ID"].ToString();
                    Session["Decuration_price"]= r["DEC_PACK_PRICE"].ToString();
                    DropDownList_decuration.Items.Add(i);
                }
                string cmdQuery2 = "Select * from FOOD_PACKAGE where f_pack_service = '" + ab + "' ";
                OracleDataAdapter b = new OracleDataAdapter(cmdQuery2, ConnectionString);
                OracleCommandBuilder builder2 = new OracleCommandBuilder(b);
                DataSet ds2 = new DataSet();
                b.Fill(ds2, "FOOD_PACKAGEes");
                foreach (DataRow r in ds2.Tables["FOOD_PACKAGEes"].Rows)
                {
                    ListItem i = new ListItem();
                    i.Text = r["f_pack_name"].ToString();
                    i.Value = r["f_pack_id"].ToString();
                    Session["FOOD_price"] = r["f_pack_price"].ToString();
                    DropDownList_food_package.Items.Add(i);
                }

            }
        }
开发者ID:tahmidanik,项目名称:ConventionHallManagementSystem,代码行数:34,代码来源:B_decoration.aspx.cs


示例3: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            OracleConnection conn = new OracleConnection();
            conn.ConnectionString = "User ID=SYSTEM; Password=19; Data Source=PC";

            try
            {
                conn.Open();
                MessageBox.Show("Veritabanına Baglantı Basarılı.");
            }
            catch
            {
                MessageBox.Show("Veritabanına Baglanılamadı.");
            }

            OracleCommand cmd = new OracleCommand();
            cmd.CommandText = "SELECT ogrenci_tablosu.ogrenci_ad, fakulte_tablosu.fakulte_ad FROM ogrenci_tablosu, bolum_tablosu, fakulte_tablosu WHERE ogrenci_tablosu.ogrenci_bolum = bolum_tablosu.bolum_id AND bolum_tablosu.bolum_fakulte = fakulte_tablosu.fakulte_id";
            cmd.Connection = conn;

            OracleDataAdapter adapter = new OracleDataAdapter();
            adapter.SelectCommand = cmd;

            DataSet dataset = new DataSet();

            adapter.Fill(dataset);

            dataGridView1.DataSource = dataset.Tables[0];

            conn.Close();
        }
开发者ID:cehars,项目名称:pro-lang,代码行数:30,代码来源:Form1.cs


示例4: ReadDataToDataSet

        /// <summary>
        /// 将数据读取到 DataSet 中.
        /// </summary>
        public void ReadDataToDataSet()
        {

            Console.WriteLine("使用DataAdapter,将数据填充到DataSet中,然后脱离数据库,直接对DataSet进行处理。");

            // 建立数据库连接.
            OracleConnection conn = new OracleConnection(connString);

            // 创建一个适配器
            OracleDataAdapter adapter = new OracleDataAdapter(SQL, conn);

            // 创建DataSet,用于存储数据.
            DataSet testDataSet = new DataSet();

            // 执行查询,并将数据导入DataSet.
            adapter.Fill(testDataSet, "result_data");

            // 关闭数据库连接.
            conn.Close();

            // 处理DataSet中的每一行数据.
            foreach (DataRow testRow in testDataSet.Tables["result_data"].Rows)
            {
                // 将检索出来的数据,输出到屏幕上.
                Console.WriteLine("NO:{0} ;  Date:{1} ; Money:{2}   ",
                    testRow["NO"], testRow["SALE_DATE"], testRow["SUM_MONEY"]
                    );
            }
        }
开发者ID:mahuidong,项目名称:my-csharp-sample,代码行数:32,代码来源:ReadOracleData.cs


示例5: GetItensEstoque

        public static DataTable GetItensEstoque()
        {
            DataTable dt = new DataTable();
            OracleDataAdapter da = new OracleDataAdapter();

            OracleConnection conn = Conexao.GetInstance();

            OracleCommand cmd = new OracleCommand();
            try
            {
                cmd.CommandText = "SELECT * FROM ITEM_ESTOQUE ";

                cmd.CommandType = CommandType.Text;
                cmd.Connection = conn;
                da.SelectCommand = cmd;
                da.Fill(dt);

                return dt;
            }
            catch (Exception ex)
            {
                strErrMsg = "Atenção, o sistema detectou o seguinte problema: " + "\r\n" +
                    "Descrição: " + Convert.ToString(ex.Message) + "\r\n" +
                    "Origem: " + Convert.ToString(ex.Source);
                MessageBox.Show(strErrMsg, "Procedimento: " + Convert.ToString(ex.TargetSite),
                      MessageBoxButtons.OK, MessageBoxIcon.Error);
                return null;
            }
        }
开发者ID:fsbflavio,项目名称:SPCP,代码行数:29,代码来源:teste.cs


示例6: MedStoreLoad

        void MedStoreLoad()
        {
            try
            {
                conn.Open();
                string sqlquery = "SELECT * FROM MED_STORE";
                //string sqlquery = "SELECT * FROM MED_INFO";
                OracleCommand cmd = new OracleCommand(sqlquery, conn);
                OracleDataAdapter oda = new OracleDataAdapter();
                oda.SelectCommand = cmd;
                dt = new DataTable();
                //     dt.Columns["MED_NAME"].ColumnName = "Name";

                oda.Fill(dt);
                BindingSource bsource = new BindingSource();
                bsource.DataSource = dt;
                dataGridView1.DataSource = bsource;
                oda.Update(dt);
                dt.Columns[0].ColumnName = "ID";
                dt.Columns[1].ColumnName = "Name";
                dt.Columns[2].ColumnName = "Quantity";
                dt.Columns[3].ColumnName = "Damage Qty";
                dt.Columns[4].ColumnName = "Reorder Level";

                dt.AcceptChanges();

                conn.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:imtanmoy,项目名称:pharmacy-Management-System,代码行数:33,代码来源:managerControls.cs


示例7: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Global.CurrentPerson == null)
                    Response.Redirect("Index.aspx");

                DataTable seasonsTable = new DataTable();
                List<Season> seasons = new List<Season>();

                using (OracleConnection objConn = new OracleConnection(Global.ConnectionString))
                {
                    // Set up the seasons command
                    var seasonsCommand = new OracleCommand("TICKETS_QUERIES.getSeasonsForPurchase", objConn) { BindByName = true, CommandType = CommandType.StoredProcedure };
                    seasonsCommand.Parameters.Add("p_Return", OracleDbType.RefCursor, ParameterDirection.ReturnValue);
                    seasonsCommand.Parameters.Add("p_PersonId", OracleDbType.Int64, Global.CurrentPerson.person_id, ParameterDirection.Input);

                    try
                    {
                        // Execute the queries and auto map the results to models
                        objConn.Open();
                        var seasonsAdapter = new OracleDataAdapter(seasonsCommand);
                        seasonsAdapter.Fill(seasonsTable);
                        seasons = Mapper.DynamicMap<IDataReader, List<Season>>(seasonsTable.CreateDataReader());
                    }
                    catch (Exception)
                    {
                        Response.Redirect("Index.aspx");
                    }

                    objConn.Close();
                }

                // Fill list dropdowns with data from the database
                if (seasons.Count > 0)
                {
                    var seasonsWithEvents = seasons.GroupBy(s => s.season_id).Select(season => new Season()
                    {
                        season_id = season.First().season_id,
                        name = season.First().name,
                        price = season.First().price,
                        ticket_count = season.First().ticket_count,
                        event_names = seasons.Where(ev => ev.season_id == season.First().season_id).Select(en => en.event_name).ToList()
                    }).ToList();

                    SeasonDropDown.DataTextField = "name";
                    SeasonDropDown.DataValueField = "season_id";
                    SeasonDropDown.DataSource = seasonsWithEvents;
                    SeasonDropDown.DataBind();

                    SeasonListView.DataSource = seasonsWithEvents;
                    SeasonListView.DataBind();
                }
                if (Request.QueryString["Success"] != null)
                {
                    Error.Text = "Successfully purchased season ticket!";
                    Error.Visible = true;
                }
            }
        }
开发者ID:scbrady,项目名称:Aphro-Webforms,代码行数:60,代码来源:BuySeasonTickets.aspx.cs


示例8: GetProdOCRData

        public DataSet GetProdOCRData(string queryName,string startDate, string endDate)
        {
            string queryPath = string.Format(@"{0}\Query\{1}", Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),queryName);
            string query = File.ReadAllText(queryPath);
            query = string.Format(query, startDate, endDate);
            DataSet ds = new DataSet();
            using (oraconnection = new OracleConnection(ConfigurationManager.AppSettings["DSN_PNRP"]))
            {
                try
                {
                    oraconnection.Open();
                    oracommand = new OracleCommand(query, oraconnection);
                    oracommand.CommandType = CommandType.Text;
                    OracleDataAdapter adp = new OracleDataAdapter(oracommand);
                    ds = new DataSet();
                    adp.Fill(ds);
                }
                catch (Exception)
                {

                }
                finally
                {
                    oraconnection.Close();
                }

                return ds;
            }
        }
开发者ID:ayandebnath67,项目名称:DEMO-CODE-REPO,代码行数:29,代码来源:OracleHelper.cs


示例9: LoginRandomEmployee

        private void LoginRandomEmployee()
        {
            DataTable employeeTable = new DataTable();
            Person employee = null;

            using (OracleConnection objConn = new OracleConnection(Global.ConnectionString))
            {
                OracleCommand objCmd = new OracleCommand("TICKETS_QUERIES.getRandomEmployee", objConn) { BindByName = true, CommandType = CommandType.StoredProcedure };

                objCmd.Parameters.Add("p_Return", OracleDbType.RefCursor, ParameterDirection.ReturnValue);

                try
                {
                    objConn.Open();
                    OracleDataAdapter adapter = new OracleDataAdapter(objCmd);
                    adapter.Fill(employeeTable);
                    employee = Mapper.DynamicMap<IDataReader, List<Person>>(employeeTable.CreateDataReader()).FirstOrDefault();
                }
                catch (Exception)
                {
                    Response.Redirect("../Default.aspx");
                }

                objConn.Close();
            }
            if (employee != null)
            {
                Global.CurrentPerson = employee;
                Global.CurrentPerson.accountType = Account.Faculty;
            }
            else
                Response.Redirect("../Default.aspx");
        }
开发者ID:scbrady,项目名称:Aphro-Webforms,代码行数:33,代码来源:Index.aspx.cs


示例10: ChiTietDuAn

        public DataTable ChiTietDuAn(string mdv, string nsd, string pas, string maDonVi, long idDuAn)
        {
            try
            {
                ConnectDB.CloseConnection(_connectGs);
                _connectGs = new OracleConnection();
                _connectGs = ConnectDB.GetOracleConnection(_connectGs);
                var cm = _connectGs.CreateCommand();
                cm.CommandText = "usp_ChiTiet_DuAn";
                cm.CommandType = CommandType.StoredProcedure;
                cm.Parameters.Add(new OracleParameter("ma_donvi", OracleDbType.Varchar2)).Value = "";
                cm.Parameters.Add(new OracleParameter("nsd", OracleDbType.Varchar2)).Value = "";
                cm.Parameters.Add(new OracleParameter("pas", OracleDbType.Varchar2)).Value = "";
                cm.Parameters.Add(new OracleParameter("id_duan", OracleDbType.Long)).Value = idDuAn;
                cm.Parameters.Add(new OracleParameter("ma_donvi_thuchien", OracleDbType.Varchar2)).Value = maDonVi;
                cm.Parameters.Add(new OracleParameter("cs_lke", OracleDbType.RefCursor)).Direction =
                    ParameterDirection.Output;

                var tableGs = new DataTable();
                _oracleAdapter = new OracleDataAdapter(cm);
                _oracleAdapter.Fill(tableGs);
                return tableGs;
            }
            catch (Exception)
            {
                return null;
            }
            finally
            {
                ConnectDB.CloseConnection(_connectGs);
            }
        }
开发者ID:nstungxd,项目名称:ips-project-vdc,代码行数:32,代码来源:GiamSatRepository.cs


示例11: addPersonToGroup

        private GroupRequest addPersonToGroup(int personId, int seriesId)
        {
            DataTable groupTable = new DataTable();
            GroupRequest groupResult = new GroupRequest();

            using (OracleConnection objConn = new OracleConnection(Global.ConnectionString))
            {
                // Set up the searchPeople command
                var command = new OracleCommand("TICKETS_API.insertGroupRequests", objConn) { BindByName = true, CommandType = CommandType.StoredProcedure };
                command.Parameters.Add("p_Return", OracleDbType.RefCursor, ParameterDirection.ReturnValue);
                command.Parameters.Add("p_PersonId", OracleDbType.Int64, Global.CurrentPerson.person_id, ParameterDirection.Input);
                command.Parameters.Add("p_RequestedId", OracleDbType.Int64, personId, ParameterDirection.Input);
                command.Parameters.Add("p_SeriesId", OracleDbType.Int64, seriesId, ParameterDirection.Input);

                // Execute the query and map the results to models
                objConn.Open();
                var groupAdapter = new OracleDataAdapter(command);
                groupAdapter.Fill(groupTable);
                groupResult.group_id = long.Parse(groupTable.Rows[0]["group_id"].ToString());
                groupResult.requested_id = long.Parse(groupTable.Rows[0]["requested_id"].ToString());
                groupResult.requested_firstname = groupTable.Rows[0]["requested_firstname"].ToString();
                groupResult.requested_lastname = groupTable.Rows[0]["requested_lastname"].ToString();

                objConn.Close();
            }

            return groupResult;
        }
开发者ID:scbrady,项目名称:Aphro-Webforms,代码行数:28,代码来源:AddToGroup.ashx.cs


示例12: btn_hyouji_Click

 private void btn_hyouji_Click(object sender, EventArgs e)
 {
     try
     {
         dt.Rows.Clear();
         dt.Columns.Clear();
         dt.Clear();
         TssSystemLibrary tssdb = new TssSystemLibrary();
         string connStr = tssdb.GetConnectionString();
         OracleConnection conn = new OracleConnection(connStr);
         OracleCommand cmd = new OracleCommand();
         cmd.Connection = conn;
         cmd.CommandType = CommandType.Text;
         string sql = "select * from " + cb_table_name.Text;
         if (tb_sql.Text.Length >= 1)
         {
             sql = sql + " " + tb_sql.Text;
         }
         cmd.CommandText = sql;
         da = new OracleDataAdapter(cmd);
         cb = new OracleCommandBuilder(da);
         das = new DataSet();
         da.Fill(dt);
         dgv_table.DataSource = null;
         dgv_table.DataSource = dt;
     }
     catch
     {
         dgv_table.DataSource = null;
     }
 }
开发者ID:tokunaga-nakamura,项目名称:tsssystem2,代码行数:31,代码来源:frm_table_maintenance.cs


示例13: DLookUp

        public object DLookUp(String column, string table, string condition)
        {
            OracleConnection objConexion = default(OracleConnection);
            OracleDataAdapter objComando = default(OracleDataAdapter);
            DataSet requestquery = new DataSet();
            object result = null;
            objConexion = new OracleConnection(driver);
            objConexion.Open();
            if (string.IsNullOrEmpty(condition))
            {
                objComando = new OracleDataAdapter("Select " + column + " from " + table, objConexion);
            }
            else
            {
                objComando = new OracleDataAdapter("Select " + column + " from " + table + " where " + condition, objConexion);
            }

            objComando.Fill(requestquery);

            try
            {
                result = requestquery.Tables[0].Rows[0][requestquery.Tables[0].Columns.IndexOf(column)];
            }
            catch (Exception ex)
            {
                result = -1;

            }
            objConexion.Close();
            return result;
        }
开发者ID:aitorlomu,项目名称:DisenoDeInterfaces,代码行数:31,代码来源:ConexionBBDD.cs


示例14: changeChartView

        private void changeChartView()
        {
            using (OracleConnection connection = new OracleConnection(FormLogin.connString))
            {
                connection.Open();
                String query = "SELECT m.idRound AS ROUND, ROUND(SUM(part.match_Rating)/COUNT(part.match_Rating)) AS TEAMRATING"
                    + " FROM participates part JOIN player p ON (part.idPlayer = p.idPlayer) JOIN match m ON (part.idMatch = m.idMatch)"
                    + " WHERE p.idTeam = " + Team.Id
                    + " GROUP BY m.idRound"
                    + " ORDER BY m.idRound";
                OracleDataAdapter adapter = new OracleDataAdapter(query, connection);
                DataTable table = new DataTable();
                adapter.Fill(table);

                chartTeamRating.DataSource = table;
                chartTeamRating.Series["Series1"].XValueMember = "Round";
                chartTeamRating.Series["Series1"].YValueMembers = "TeamRating";
            }

            chartTeamRating.ChartAreas["ChartArea1"].AxisX.Title = "Rounds";
            chartTeamRating.ChartAreas["ChartArea1"].AxisY.Title = "Rating";
            chartTeamRating.ChartAreas["ChartArea1"].AxisX.Minimum = 1;
            chartTeamRating.ChartAreas["ChartArea1"].AxisX.Maximum = 38;
            chartTeamRating.ChartAreas["ChartArea1"].AxisX.Interval = 1;
            chartTeamRating.ChartAreas["ChartArea1"].AxisY.Minimum = 1000;
            chartTeamRating.ChartAreas["ChartArea1"].AxisY.Maximum = 3000;
            chartTeamRating.ChartAreas["ChartArea1"].Visible = true;
            chartTeamRating.Series["Series1"].BorderWidth = 3;



        }
开发者ID:BaziAplikacija,项目名称:TipsterCup,代码行数:32,代码来源:FormTeam.cs


示例15: setDataGrid

 private void setDataGrid()
 {
     
     DataTable table = new DataTable();
     using (OracleConnection connection = new OracleConnection(FormLogin.connString))
     {
         String query = "SELECT c.description as Tip, c.value as Coefficient, r.homeTeam as HomeTeam, r.goalshome || ' - ' || r.goalsguest as Result, r.guestteam as GuestTeam"
             + " FROM Computegain c JOIN Results r ON (c.idMatch = r.idMatch) WHERE c.idTipster = "+idTipster;
         OracleDataAdapter adapter = new OracleDataAdapter(query, connection);
         adapter.Fill(table);
         
     }
     dataGrid.DataSource = table;
     dataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
     dataGrid.AutoSize = true;
     dataGrid.DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter;
     dataGrid.Columns["Tip"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight;
     dataGrid.Columns["HomeTeam"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight;
     dataGrid.Columns["GuestTeam"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomLeft;
     dataGrid.Columns["GuestTeam"].HeaderText = "Guest Team";
     dataGrid.Columns["HomeTeam"].HeaderText = "Home Team";
     dataGrid.Columns["Tip"].HeaderText = "Tip";
     dataGrid.Columns["Coefficient"].HeaderText = "Coefficient";
     dataGrid.Columns["Result"].HeaderText = "Result";
     
     
 }
开发者ID:BaziAplikacija,项目名称:TipsterCup,代码行数:27,代码来源:FormTipster.cs


示例16: con_btn_Click

        protected void con_btn_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(TextBox_ad_pay.Text))
            {
                LabelMessage.Text = "Advance Payment is empty";
                TextBox_ad_pay.Focus();
            }
            else
            {
            int advanced = Convert.ToInt32(TextBox_ad_pay.Text);
            int due = Convert.ToInt32( Session["total_price"]) - advanced;

            string ConnectionString = @"DATA SOURCE=127.0.0.1:1521/XE;PERSIST SECURITY INFO=True;USER ID=TAHMID; Password=anik";

            string cmdQuery = "insert into CLIENT(C_ID, C_NAME, C_PHONE, C_EMAIL, C_ADDRESS, C_GUEST, C_SERVICE_ID, C_F_PACK_ID, C_D_PACK_ID, C_R_TIME, C_R_DATE) values (client_seq.NEXTVAL, '" + Session["B_c_name"] + "', '" + Session["B_c_phone"] + "', '" + Session["B_c_email"] + "', '" + Session["B_c_address"] + "', '" + Session["gest"] + "', '" + Session["B_c_package"] + "', '" + Session["f_package"] + "', '" + Session["d_package"] + "', '" + Session["r_date"] + "', '" + Session["r_time"] + "' )";
            OracleDataAdapter a = new OracleDataAdapter(cmdQuery, ConnectionString);
            OracleCommandBuilder builder = new OracleCommandBuilder(a);
            DataSet ds = new DataSet();
            a.Fill(ds, "client");

            string cmdquery2 = "Select C_ID from CLIENT where C_NAME = '" + Session["B_c_name"] + "' and C_PHONE = '" + Session["B_c_phone"] + "' ";
            OracleDataAdapter b = new OracleDataAdapter(cmdquery2, ConnectionString);
            OracleCommandBuilder builder2 = new OracleCommandBuilder(b);
            DataSet ds2 = new DataSet();
            b.Fill(ds2, "client_id");
            int cid = Convert.ToInt32(ds2.Tables["client_id"].Rows[0]["C_ID"]);

            string cmdQuery3 = "insert into COST(CO_ID, CO_C_ID, CO_DEC, CO_F_PR, CO_F_TOTAL, CO_TOTAL, CO_ADVANCED, CO_DUE) values (cost_seq.NEXTVAL, '" + cid + "','" + Session["Decuration_price"] + "', '" + Session["FOOD_price"] + "' ,'" + Session["total_f_price"] + "', '" + Session["total_price"] + "', '" + advanced + "', '" + due + "')";
            OracleDataAdapter c = new OracleDataAdapter(cmdQuery3, ConnectionString);
            OracleCommandBuilder builder3 = new OracleCommandBuilder(c);
            DataSet ds3 = new DataSet();
            c.Fill(ds3, "COST");
            Response.Redirect("booking.aspx");
            }
        }
开发者ID:tahmidanik,项目名称:ConventionHallManagementSystem,代码行数:35,代码来源:cost.aspx.cs


示例17: throwSelect

        public DataTable throwSelect(string sql)
        {
            DataTable dt = new DataTable();

            string ConnectionString = "";
            ConnectionString = "DATA SOURCE = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.70)(PORT = 1521)))";
            ConnectionString += "(CONNECT_DATA = (SERVICE_NAME = UBIZDB)));";
            ConnectionString += "USER ID=RCS;PASSWORD=RCS";

            OracleConnection conn = new OracleConnection(ConnectionString);

            conn.Open();

            OracleCommand oracmd = new OracleCommand();
            oracmd.Connection = conn;
            oracmd.CommandType = CommandType.Text;

            oracmd.CommandText = sql;

            OracleDataAdapter adapter = new OracleDataAdapter();

            adapter.SelectCommand = oracmd;

            //adapter.Fill(ds);
            adapter.Fill(dt);

            return dt;
        }
开发者ID:RyuHumiya,项目名称:RCS,代码行数:28,代码来源:CommonClass.cs


示例18: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string cmdQuery = "Select * from DESIGNATION";
         OracleDataAdapter a = new OracleDataAdapter(cmdQuery, ConnectionString);
         OracleCommandBuilder builder = new OracleCommandBuilder(a);
         DataSet ds = new DataSet();
         try
         {
             a.Fill(ds, "DESIGNATION");
             foreach (DataRow r in ds.Tables["DESIGNATION"].Rows)
             {
                 ListItem i = new ListItem();
                 i.Text = r["D_NAME"].ToString();
                 i.Value = r["D_ID"].ToString();
                 Stuff_position_DropDownList.Items.Add(i);
             }
             show_ts(1);
         }
         catch(Exception er)
         {
             Response.Write("<script language= 'javascript'>alart('Connection Problem');</script>");
         }
         finally { }
     }
 }
开发者ID:tahmidanik,项目名称:ConventionHallManagementSystem,代码行数:27,代码来源:AddStuff.aspx.cs


示例19: DataTable

        public DataTable Consulta
        (
            string pQuery,
            string pConnectionString
        )
        {
            DataTable lTable = new DataTable();
            DataSet lDataSet = new DataSet();
            OracleConnection lConnection = new OracleConnection(pConnectionString);

            try
            {
                lConnection.Open();

                OracleDataAdapter lDataAdapter = new OracleDataAdapter(pQuery, pConnectionString);

                lDataAdapter.Fill(lDataSet);

                lTable = lDataSet.Tables[0];

                return lTable;
            }
            finally
            {
                lConnection.Close();
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_PORTAL,代码行数:27,代码来源:OracleDo.cs


示例20: changeChartView

        public void changeChartView()
        {
            
            using (OracleConnection connection = new OracleConnection(FormLogin.connString))
            {
                connection.Open();
                String query = "SELECT m.idround as round, p.Match_Rating FROM participates p JOIN match m ON(p.idMatch = m.idMatch) WHERE p.idPlayer = "+Player.Id+" ORDER BY m.idRound";
                DataTable table = new DataTable();
                OracleDataAdapter dataAdapter = new OracleDataAdapter(query, connection);
                dataAdapter.Fill(table);
                chartPlayerRating.DataSource = table;
                chartPlayerRating.Series["Series1"].XValueMember = "Round";
                chartPlayerRating.Series["Series1"].YValueMembers = "Match_Rating";
                

            }

            chartPlayerRating.ChartAreas["ChartArea1"].AxisX.Title = "Rounds";
            chartPlayerRating.ChartAreas["ChartArea1"].AxisX.Minimum = 1;
            chartPlayerRating.ChartAreas["ChartArea1"].AxisX.Maximum = 38;
            chartPlayerRating.ChartAreas["ChartArea1"].AxisX.Interval = 1;


            chartPlayerRating.ChartAreas["ChartArea1"].AxisY.Title = "Rankings";
            chartPlayerRating.ChartAreas["ChartArea1"].AxisY.Minimum = 1000;
            chartPlayerRating.ChartAreas["ChartArea1"].AxisY.Maximum = 3000;

            chartPlayerRating.ChartAreas["ChartArea1"].Visible = true;
            chartPlayerRating.Series["Series1"].BorderWidth = 3;
        }
开发者ID:BaziAplikacija,项目名称:TipsterCup,代码行数:30,代码来源:FormPlayer.cs



注:本文中的OracleDataAdapter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# OracleDataReader类代码示例发布时间:2022-05-24
下一篇:
C# OracleDBObj类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap