473,382 Members | 1,717 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,382 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 4719

"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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.