本人在数据操作过程中,将DBF文件中的大量数据显示在Gridview中,但是要选择其中的几列导入到ORACL的一个表中,而且要多次执行,
请高手给个例子?

解决方案 »

  1.   

     string MyID = string.Empty;
            int i = 0;
            foreach (GridViewRow Gvr in GridView1.Rows)
            {
                CheckBox Cbx = (CheckBox)Gvr.FindControl("mycheck");
                if (Cbx.Checked)
                {
                    string delid = Gvr.Cells[1].Text;
                    MyID += " or Pid ='" + delid + "'";
                    i++;
                }
            }
            if (i > 0)
            {
               string newPid= MyID.Substring(3, MyID.Length - 3);
                Response.Write(""+newPid  +"");
                string instr = "insert  T_Base_RevMSG(数据)values(数据) where "+newPid  +"";
                if (balcls.sqlcom(inlstr))
                {
                    gvbind();
                }
                       }