Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Cursors, ExecuteNonQuery and C#

Cursors, ExecuteNonQuery and C#

From: Matthew Houseman <mhousema_at_ix.netcom.com>
Date: 28 Sep 2003 17:51:06 -0700
Message-ID: <73986c9d.0309281651.366aea76@posting.google.com>

All,

Is it possible for ExecuteNonQuery to open a cursor? The reason I ask is that I'm debugging a client's C# service using ODP.NET which is leaking cursors and eventually Oracle throws a MAX CURSOR EXCEEDED exception and the service dies a horrible death. It appears that the method that is the main culprit calls several stored procedures which do something like:

INSERT INTO FOO ( ... ) RETURNING FOO_ID; The FOO_ID is setup in the C# as an output parameter and additionally, the client never calls the Dispose method on the Command object.

Additionally, the Command objects are used like so: cmd = new OleDbCommand("sp1", cnx);
....

cmd.ExecuteNonQuery();
....

cmd = new OleDbCommand("sp2", cnx);
....

cmd.ExecuteNonQuery();
....

Would this technique cause cursor leaks? Thanks...

Matt Received on Sun Sep 28 2003 - 19:51:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US