Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Cursors, ExecuteNonQuery and C#
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
![]() |
![]() |