zoukankan      html  css  js  c++  java
  • OleDbSqlHelper使用例子

            private void button1_Click(object sender, EventArgs e)
            {
                //       this.bindingSource1.DataSource = Bmk.FindAll();
                this.bindingSource1.DataSource =
                    OleDbHelper.ExecuteDataTable(Conn.AccessConnection,
                    @"select * from bmk order by bmxh ");
                this.dataGridView1.DataSource = bindingSource1;

                this.label1.Text = Bmk.GetCount(Condition.Empty).ToString();
                //      MessageBox.Show(Bmk.FindById(1).xm);
            }

            private void button2_Click(object sender, EventArgs e)
            {
                int i = 0;
                foreach (var bmk in Bmk.FindAll())
                {
                    if (!string.IsNullOrWhiteSpace(bmk.tcxm))
                    {
                        OleDbParameter[] param = new OleDbParameter[2];
                        param[0] = OleDbHelper.CreateInParam("tcxm",OleDbType.Char,2, bmk.tcxm);
                        param[1] = OleDbHelper.CreateInParam("bmxh", OleDbType.Char, 9, bmk.bmxh);
                        string strSql = @"update bmk set tcxm = ? where bmxh = ? ";
                        OleDbHelper.ExcuteSQL(Conn.VfpConnection, strSql, param);

                        //string strSql = string.Format("update bmk set tcxm = '{0}' where bmxh = '{1}' ",
                        //    bmk.tcxm, bmk.bmxh);
                        //OleDbHelper.ExcuteSQL(Conn.VfpConnection, strSql);
                    }
                    i++;
                    //if (i > 10)
                    //    break;
                }
                MessageBox.Show("OK!");
            }

  • 相关阅读:
    UNIX Systems Programming Programs
    thrift 使用小结 日月光明的日志 网易博客
    刘汝佳_百度百科
    分享:const、static关键字
    图灵社区 : 图书 : UNIX网络编程 卷1:套接字联网API(英文版•第3版)
    【转】nDCG measure相关概念 浅色天空的日志 网易博客
    分享:ProgBuddy —— 远程编码协作环境
    string::assign MemoryGarden's Blog C++博客
    Vector quantization向量化编码
    k均值算法
  • 原文地址:https://www.cnblogs.com/shiningrise/p/1979211.html
Copyright © 2011-2022 走看看