修改 init.ora 的参数:
   OPEN_CURSORS = 征大

解决方案 »

  1.   

    不能盲目的增加open_cursors这个参数,我认为一定是你在用OleDbReader这个控制时使用后未关关闭引起的。
      

  2.   

    我想你每循环一次就打开一个OleDbReader,这样是不可取的.
      

  3.   

    关闭了。for(i=1;i<=arrayCpuName.Count;i++)
    {

    string strCmd = "select cpuname,collecttime,ipaddr,idletime from cpu where cpuname='"+arrayCpuName[i-1].ToString()+"' and  rownum<2  order by collecttime  desc ";
    Console.WriteLine(strCmd);
    oleDbCommand=new OleDbCommand(strCmd,oleDbConnection);
    oleDbReader=oleDbCommand.ExecuteReader();while(oleDbReader.Read())
    {
    listItems[0]=oleDbReader["cpuname"].ToString();
    listItems[1]=oleDbReader["collecttime"].ToString();
    listItems[2]=oleDbReader["ipaddr"].ToString();
    listItems[3]=oleDbReader["idletime"].ToString();}
    oleDbReader.Close();listView1.Items.Insert(count,new ListViewItem(listItems));
    count++;
    }在timer_Tick()
    {
     调用
    }
    请问如何解决?
      

  4.   

    主要是要把连接(connection)关掉!不要建立太多连接,open 以后记住要close
      

  5.   

    把init.ora的参数:
       OPEN_CURSORS增大,重启数据库或机器注意:不要过多使用游标,用完要关闭,不然很耗资源
      

  6.   

    For 循环中再这样,我想可能不好
      

  7.   

    upDispose一下oleDbCommand和oleDbReader试试