Exceptions after a .Open of a SQLConnection

  • Thread starter Thread starter michael
  • Start date Start date
M

michael

Any thoughts on what would cause the following exception
to be thrown after a .Open call to a SQLConnection object?

"System.OutOfMemoryException"

My task manager indicates no memory deficit.

Michael
 
Can you run the query in Query Analyzer or whatever and get a look at what
you're returning? You may be getting more than you expected because of some
errors in your SQL.

If this is the case you may be running out of memory. Try altering it to
return less and see if this works



--

Regards - One Handed Man

Author : Fish .NET & Keep .NET
MSCFN, MSAFA
==============================
 
Actually, I get the exception just by executing the .Open
command. No query has been run yet. Therefore, there
shouldn't be a problem with too much data being returned.
In fact, most of the time the exact same
SQLConnection .Open's just fine.


Michael
 
This is a simple piece of code which intermittantly fails.

dim cn as new SQLConnection(strConnectionString)
cn.Open
[Exception is thrown]

That's it. It was working fine for months without any
changes. Then, on the day the Blaster worm hit, it began
giving me the error stated in this post. Of course, I
patched the computers which have the worm. However, this
exception was being raised on computers which didn't have
MSBLAST.EXE in the "Processes" list. (So, it's hard to
blame it on the worm since it's not on the computer where
the exception is being raised - unless there's something
that I'm not thinking about). BTW, this is a dotnet 1.1
application running on win 2K machines with sp4.
Applications running on XP machines so far work fine.

Another odd thing. After the application raises the
exception, I loose the ability to open certain .xml files
in the application directory with the Internet Explorer
(I can open them with notepad.exe). IE can still browse
the internet but it can't open this particular .xml file
in the application's directory. And, another odd thing,
If I open the control panel after the application raises
the exception, the control panel does not open correctly.

All the symptoms go away, and the application runs
correctly after I reboot. Then, however, the exception
occurs at a random time in the futute.

I know I gave you a lot of information, but there you go.
I don't really know where to search next.

Thanks for your advice.

Michael
-----Original Message-----
I wasn't able to find anything on this error. Do you
have a small code sample that can cause this? Do you get
the same error on other machines? If you have a situation
that
reproduces it I will be glad to try to track it down..

Want to know more? Check out the MSDN Library at
http://msdn.microsoft.com or the Microsoft Knowledge
Base at http://support.microsoft.com
 
IF it was happening on machines where the worm had not been then you need to look for a common denominator.. Such as, Do they all (The ones that fail) connect to the same
server? Was the Server infected? Perhaps THAT machine is where the problem lies...

Want to know more? Check out the MSDN Library at http://msdn.microsoft.com or the Microsoft Knowledge Base at http://support.microsoft.com

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.




--------------------
Content-Class: urn:content-classes:message
From: "michael" <[email protected]>
Sender: "michael" <[email protected]>
References: <[email protected]> <[email protected]>
Subject: RE: Exceptions after a .Open of a SQLConnection
Date: Wed, 20 Aug 2003 10:39:25 -0700
Lines: 98
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNnQf+XQMWzYZDCSKu/PpvEu+7nkQ==
Newsgroups: microsoft.public.dotnet.framework.adonet
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:58779
NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
X-Tomcat-NG: microsoft.public.dotnet.framework.adonet

This is a simple piece of code which intermittantly fails.

dim cn as new SQLConnection(strConnectionString)
cn.Open
[Exception is thrown]

That's it. It was working fine for months without any
changes. Then, on the day the Blaster worm hit, it began
giving me the error stated in this post. Of course, I
patched the computers which have the worm. However, this
exception was being raised on computers which didn't have
MSBLAST.EXE in the "Processes" list. (So, it's hard to
blame it on the worm since it's not on the computer where
the exception is being raised - unless there's something
that I'm not thinking about). BTW, this is a dotnet 1.1
application running on win 2K machines with sp4.
Applications running on XP machines so far work fine.

Another odd thing. After the application raises the
exception, I loose the ability to open certain .xml files
in the application directory with the Internet Explorer
(I can open them with notepad.exe). IE can still browse
the internet but it can't open this particular .xml file
in the application's directory. And, another odd thing,
If I open the control panel after the application raises
the exception, the control panel does not open correctly.

All the symptoms go away, and the application runs
correctly after I reboot. Then, however, the exception
occurs at a random time in the futute.

I know I gave you a lot of information, but there you go.
I don't really know where to search next.

Thanks for your advice.

Michael
-----Original Message-----
I wasn't able to find anything on this error. Do you
have a small code sample that can cause this? Do you get
the same error on other machines? If you have a situation
that
reproduces it I will be glad to try to track it down..

Want to know more? Check out the MSDN Library at
http://msdn.microsoft.com or the Microsoft Knowledge
Base at http://support.microsoft.com
Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided "AS IS", with no warranties, and confers no rights.
 
Back
Top