ORA-01000: maximum open cursors exceeded
private void btnUpload_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection(cVar.conString);
conn.Open();
OleDbCommand comm = conn.CreateCommand();
//###### Read data on Access Database ######
comm.CommandText = "SELECT * FROM cycle_results where date_and_time_stamp BETWEEN #" + Convert.ToDateTime(strFrom) + "# AND #" + Convert.ToDateTime(strTo) + "#";
cVar.dataReader = comm.ExecuteReader();
if (cVar.dataReader.HasRows)
{
cVar.dataReader.Close();
dataGridView1.DataSource = null;
DataSet ds = new DataSet();
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(comm);
dataAdapter.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
conn.Close();
//****** Transfer data from Datagrid to Oracle ******/
OracleConnection oraConn = new OracleConnection("user id=user;password=pword;data source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.1.203)(PORT = 1521)))(CONNECT_DATA = (SID = FX21)(SERVER = DEDICATED))); Persist Security Info=True;Unicode=True");
oraConn.Open();
OracleDataReader oDR;
for (int ctr = 0; ctr < dataGridView1.Rows.Count; ctr++)
{
cVar.dataReader.Close();
OracleCommand oComm = oraConn.CreateCommand();
oComm.CommandText = "SELECT * FROM mytable";
oDR = oComm.ExecuteReader(); <<<<=== error here
if (oDR.HasRows)
{
oComm.CommandText = "UPDATE DB.. etc.. etc...
}
oDR = oComm.ExecuteReader(); = error msg: "ORA-01000: maximum open cursors exceeded"
where is the maximum cursors exceeded?
pls help. tnx
Re: ORA-01000: maximum open cursors exceeded
How many iterations of the loop are completed before that exception is thrown?
Also, can you please use tags with your code? After 269 posts that should be a given.
Re: ORA-01000: maximum open cursors exceeded
What version of Oracle? What is the Max_Cursor value set in the .init file set to (or the sfile).
Re: ORA-01000: maximum open cursors exceeded
the iteration of "ctr" is equal to 300
if i set my time below only 4 rows found and no prob.
but when rows found are many it will display the "max cursors"
dtpFrom.Text = "12/12/2007";
dtpTo.Text = "12/12/2007";
how do i solvd?, is there a conflict connecting access at the same time in oracle?