Re: Weird exception thrown

Eddie Lascu <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Organization IBI Group
Message-ID <[email protected]>
Dave,

Very interesting idea. So you are suggesting that instead of issuing a
"select * from ..." I should issue a "select count(*) from ..." and check
for the scalar value returned. I will definitely try it.

Thanks bunches for your suggestion. Will keep you up to date.

Regards,
Eddie


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[email protected]] On Behalf Of Dave Jones
Sent: Monday, January 12, 2009 3:01 AM
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] Weird exception thrown

I can't check this at the moment, I'm on the train, I don't think that the
has rows will work you need to execute a scaler to return one value
restricting the result to one line and check for null.  There are lots of
gotcha's in odp. So much in fact that we gave up trying to figure them all
out and went back to ms even though it lacks lots of functionality. 

Dave
Dave JONES
[email protected]
06.50.14.38.33

-----Original Message-----
From:         Alex Ivanoff <[email protected]>

Date:         Sun, 11 Jan 2009 19:29:31 
To: <[email protected]>
Subject: Re: [ADVANCED-DOTNET] Weird exception thrown


What is the exception type? OutOfMemoryException?


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[email protected]] On Behalf Of Eddie Lascu
Sent: Sunday, January 11, 2009 19:20
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] Weird exception thrown


 
I sent this message to the list last week, but I did not receive it. Is it
that with the list relocated, the sender do not get its own messages? I am
trying to resend. If you guys got it twice, I apologize in advance.
 
Regards,
Eddie


_____  

From: Eddie Lascu [mailto:[email protected]]
Sent: Sunday, January 11, 2009 8:11 PM
To: '[email protected]'
Subject: Weird exception thrown


Hello,
 
I have an application that reads an XML file, parses it and saves its
data
into an Oracle database. The save is actually an insert, if the record
doesn't exist or an update if the record exists. In order to figure out
which operation I have to perform, I execute a select, to check whether
the
record is already in the database. I build the Select SQL statement,
create
an Oracle Command object with it and then call its Execute Reader
method.
This method returns an OracleDataReader object and for that, all I care
to
check is to see whether it has any records. The OracleDataReader class
has a
property called "HasRows" that will tell me just that.
I know what you are thinking: I should ask this question on a different
forum, like one Oracle hosts for their ODP.NET development, but bare
with me
for a second.
After running for 2-3 days continuously, my application starts throwing
this
weird exception where it says that "Memory could not be allocated". I
managed to trace the raise of the exception to the invocation of the
"HasRows" property for the OracleDataReader object. The problem is that,
looking at the documentation, that property is not raising any
exceptions,
so what the heck is going on.
To keep things under control, I even tried to kick in the garbage
collection
(GC.Collect()) myself, every now and then. Now the exception takes
longer to
be triggered, but eventually it is triggered.
Can anyone give me some ideas as to what else to try and figure out what
the
problem is? The XML files are not really big, averaging around 100 kB
each.
When the exception is triggered, I look ion the task manager and
Physical
Memory usage is nowhere near the top.
Any suggestion will be highly appreciated.
 
TIA,
Eddie 
 
PS: Further to my message, two more things that I observed: 
 
1. If I kill the process and then restart it, the exception is no longer
triggered for the 3-day interval;
2. If, while the exception is thrown, I force the garbage collection,
that
still doesn't fix the problem, or at least not right away, but I didn't
have
the patience to see if it gets resolved after a while.
 
 

===================================
View archives and manage your subscription(s) at
http://peach.ease.lsoft.com/archives

===================================
View archives and manage your subscription(s) at
http://peach.ease.lsoft.com/archives

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.