473,410 Members | 1,977 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,410 software developers and data experts.

ASP.NET 2.0, VB, SQLServer: The connection was not closed.

Steve Kiss
Hello. I have a asp.net 2.0 website that uses SqlServer as a database. I use the basic provider architecture for a custom module. For some reason I get the following error:

Exception Details: System.InvalidOperationException: The connection was not closed. The connection's current state is open.

Unfortunately, this isn't very descriptive. Does someone know what this means?

Thank you
Jun 13 '07 #1
2 6550
TRScheel
638 Expert 512MB
Hello. I have a asp.net 2.0 website that uses SqlServer as a database. I use the basic provider architecture for a custom module. For some reason I get the following error:

Exception Details: System.InvalidOperationException: The connection was not closed. The connection's current state is open.

Unfortunately, this isn't very descriptive. Does someone know what this means?

Thank you
Well, i doubt this is going to be of much help, but it literally means one of your sql connections was not closed.

The object has a .Close() function that should be called.
Jun 13 '07 #2
Well, i doubt this is going to be of much help, but it literally means one of your sql connections was not closed.

The object has a .Close() function that should be called.
Thank. That was the problem. I assumed the following would close the connection automatically:

returnReader = command.ExecuteReader( _
CommandBehavior.CloseConnection)


It doesn't! I had to explicitly close it.

Thank you
Jun 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mdurliSPAMFILTER | last post by:
Hello, I developed a win32 .exe CGI that connects to a clustered SQLServer to report some data. The software is written with Borland C++Builder. This is the oledb string:...
6
by: Steven Blair | last post by:
Hi, I am writing an application using a 3 tier model (Client, Business Layer and DB) The DB layer creates a OdbcDataReader object back up to the Client where the data is read and displayed on...
13
by: Larry | last post by:
Hi I have asp.net programs. I used a very simple data transfer method by using URLs ˇ°First.aspxˇ± contents a line to send data to the ˇ°second.aspxˇ± page, for
26
by: Rajeev Tipnis | last post by:
http://support.microsoft.com/default.aspx?scid=kb;en- us;819450 Questions: 1) Is this patch (fix) applicable to the .NET 1.1 Framework as well? That is, if we have Framework 1.1 (On...
5
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
2
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
How to configure the IIS, ASPNET userID, Windows or SQL Authentiation, std or integrated security for SQLserver database? The VS.net 2002 web server and SQL Server client are at the same PC, ...
1
by: Amit | last post by:
Hello , Is there any way i can import data from datagrid to sqlserver. please advise . thanks & Regards
3
by: senthilnova | last post by:
hi all i have c# class which calls a stored procedure having insert,update and delete method (using if to switch between them). when i call the SP to EXECUTENONQUER() there is no response from...
4
by: Sin Jeong-hun | last post by:
I don't get the message so it's hard to debug that, but some of my clients report that they get "The underlying connection was closed unexpectedly" exception. According to this site (http://...
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.