Click here to Skip to main content
12,953,937 members (41,724 online)
Rate this:
Please Sign up or sign in to vote.
See more:
ExecuteReader requires an open and available Connection. The connection's current state is closed.

guys please help with this.
Posted 14-Jan-13 10:12am
Updated 14-Jan-13 10:15am
richcb 14-Jan-13 16:29pm
This is not a question, it is two sentences without any context, code, or direction.
Sergey Alexandrovich Kryukov 14-Jan-13 16:36pm
Exactly. I'm not deleting it only one answer is already there. Generally, we should avoid providing answers to such "questions"; attempting to do so would lead us too far...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The message is clear: the connection property of your object must be a valid reference to an open connection. If the connection is closed then the method throws such an exception. See, for instance, SqlCommand.ExecuteReader[^] at MSDN.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,464
CHill60 3,490
Maciej Los 3,123
ppolymorphe 2,020
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 14 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100