473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Open cursors

Not sure if this is more a .Net question or an Oracle question but
hey...

I have an OracleConnection object in C# that I'm passing around a lot
of other objects in sequence. This way one connection is used for all
objects and its basically saying "perform your job on this
connection". However, despite the fact that I'm closing the connection
when eahc object is finished with it, the cursors which it opens in
the database seem to stay around for quite some time, only
disappearing when I shut the application down. How can I ensure that i
don't get to the stage that the open_cursors variable is exceeded? Is
there a way of saying ordering a connection to close all cursors
associated with what it just did?

Ta,
SSM
Jul 19 '05 #1
1 4721

"Steve Morrell" <St***********@techprt.co.uk> wrote in message
news:3d***********************@posting.google.com. ..
Not sure if this is more a .Net question or an Oracle question but
hey...

I have an OracleConnection object in C# that I'm passing around a lot
of other objects in sequence. This way one connection is used for all
objects and its basically saying "perform your job on this
connection". However, despite the fact that I'm closing the connection
when eahc object is finished with it, the cursors which it opens in
the database seem to stay around for quite some time, only
disappearing when I shut the application down. How can I ensure that i
don't get to the stage that the open_cursors variable is exceeded? Is
there a way of saying ordering a connection to close all cursors
associated with what it just did?

Ta,
SSM


Not familiar with C#. Why one would close the connection once each object
is done is a mystery to me. Unless there is some sort of connection pooling
then you are building up and tearing down a connection (an expansive thing
to do) all the time. If you are connection pooling then that is a different
matter. It sounds like your application is leaking cursors. The easy way
is to close each cursor when you are done. The better way is to not open the
cursor if it is already open and just reuse it. (See Oracle's application
developer's Guide)

Jim
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: T.S.Negi | last post by:
Hi All, I want to avoid using cursors and loops in stored procedures. Please suggest alternate solutions with example (if possible). Any suggestion in these regards will be appreciated. ...
1
by: Sam | last post by:
I have an application that sits in the traybar that calls a msde sp3a database to verify that the connection to the sql server instance exists. If the sql server is up obviously the application...
1
by: Adam Right | last post by:
Hi, I am developing a program with visual studio 2005 beta using C#. I have a problem about opened cursors on my Oracle 9i database. I cannot dispose opened cursors although there is a close...
6
by: a | last post by:
Hello, I am doing some multithreading in an MDI app, and I can't seem to get the cursor to stay as an Hourglass. I call: Cursor.Current = cursors.wait at the beginning of my routing, and...
1
by: jcrouse | last post by:
This is sort of a revisited item from about two months ago (don't get mad Cor) with additional code. I am creating a batch file called CreateMameGames.bat. I am then running that batch file to...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
0
by: Joe | last post by:
I am having difficulties with closing cursors after using select. can somebody give me a hand? Dim OraSession = CreateObject("OracleInProcServer.XOraSession") Dim MyDatabase =...
1
by: Dima Kuchin | last post by:
Hello, I was trying to find the information about when and where should I use cursors in DB2, no luck. Maybe you can point me to some article that describes just that (or tell me which page is...
1
by: Steve Morrell | last post by:
Not sure if this is more a .Net question or an Oracle question but hey... I have an OracleConnection object in C# that I'm passing around a lot of other objects in sequence. This way one...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.